com.liferay.portal.wsrp
Class ConsumerRegistryImpl

java.lang.Object
  extended by com.liferay.portal.wsrp.ConsumerRegistryImpl
All Implemented Interfaces:
org.apache.wsrp4j.producer.ConsumerRegistry

public class ConsumerRegistryImpl
extends java.lang.Object
implements org.apache.wsrp4j.producer.ConsumerRegistry

View Source

Author:
Michael Young

Constructor Summary
ConsumerRegistryImpl(org.apache.wsrp4j.producer.provider.Provider provider)
           
 
Method Summary
 boolean check(java.lang.String regHandle)
          Evaluates whether a registration with regHandle exists or not.
 void deregister(java.lang.String regHandle)
          Deletes the registration of a certain consumer (identified by regHandle) from the hashmap.
 org.apache.wsrp4j.producer.Registration get(java.lang.String regHandle)
          Returns a certain registration identified by regHandle.
 java.util.Iterator getAll()
          Returns all registrations (of all consumers) currently stored in the hashmap.
 boolean isRegistrationRequired()
          Provides information about whether this producer requires registration or not.
 org.apache.wsrp4j.producer.Registration register(oasis.names.tc.wsrp.v1.types.RegistrationData registrationData)
          Creates a new registration-object for a certain consumer, adds it to the hashmap and returns it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConsumerRegistryImpl

public ConsumerRegistryImpl(org.apache.wsrp4j.producer.provider.Provider provider)
                     throws org.apache.wsrp4j.exception.WSRPException
Throws:
org.apache.wsrp4j.exception.WSRPException
Method Detail

isRegistrationRequired

public boolean isRegistrationRequired()
Provides information about whether this producer requires registration or not. Queries the DescriptionHandler to figure this out.

Specified by:
isRegistrationRequired in interface org.apache.wsrp4j.producer.ConsumerRegistry
Returns:
A boolean indicating whether registration is required or not

register

public org.apache.wsrp4j.producer.Registration register(oasis.names.tc.wsrp.v1.types.RegistrationData registrationData)
                                                 throws org.apache.wsrp4j.exception.WSRPException
Creates a new registration-object for a certain consumer, adds it to the hashmap and returns it.

Specified by:
register in interface org.apache.wsrp4j.producer.ConsumerRegistry
Parameters:
registrationData - RegistrationData-object
Returns:
Registration Registration-object
Throws:
org.apache.wsrp4j.exception.WSRPException

get

public org.apache.wsrp4j.producer.Registration get(java.lang.String regHandle)
Returns a certain registration identified by regHandle.

Specified by:
get in interface org.apache.wsrp4j.producer.ConsumerRegistry
Parameters:
regHandle - String representing the regHandle.
Returns:
Registration Registration-object identified by regHandle.

getAll

public java.util.Iterator getAll()
Returns all registrations (of all consumers) currently stored in the hashmap.

Specified by:
getAll in interface org.apache.wsrp4j.producer.ConsumerRegistry
Returns:
Iterator of an registration collection containing all registrations.

deregister

public void deregister(java.lang.String regHandle)
Deletes the registration of a certain consumer (identified by regHandle) from the hashmap.

Specified by:
deregister in interface org.apache.wsrp4j.producer.ConsumerRegistry
Parameters:
regHandle - String representing the regHandle.

check

public boolean check(java.lang.String regHandle)
Evaluates whether a registration with regHandle exists or not. Returns true if registration exists, else false.

Specified by:
check in interface org.apache.wsrp4j.producer.ConsumerRegistry
Parameters:
regHandle - String representing the regHandle.
Returns:
Returns true if registration exists, else false.