public interface ConsumerRegistry
| Modifier and Type | Method and Description |
|---|---|
void |
activateConsumerWith(String id)
Activates the consumer associated with the specified identifier if and only if access to the remote producer is properly setup (i.e.
|
boolean |
containsConsumer(String id)
Whether or not this registry knows about a consumer with the specified identifier.
|
WSRPConsumer |
createConsumer(String id,
Integer expirationCacheSeconds,
String wsdlURL)
Creates a consumer with the specified associated producer identifier, caching producer metadata for the specified time in seconds and accessing the related producer via the
specified WSDL location.
|
void |
deactivateConsumerWith(String id)
Desactivates the consumer, unregistering it from the FederatingPortletInvoker, meaning that it cannot be interacted with anymore by the portal in which WSRP is running.
|
void |
destroyConsumer(String id)
Destroys the specified consumer taking care of cleaning (if needed) things up at the same time, meaning: unregistering if registered, deactivating if activated and removing
the
consumer from persistent storage.
|
int |
getConfiguredConsumerNumber()
Retrieves the number of configured consumers.
|
List<WSRPConsumer> |
getConfiguredConsumers()
Retrieves the list of configured consumers.
|
Collection<String> |
getConfiguredConsumersIds()
Retrieves the identifiers for all known consumers.
|
WSRPConsumer |
getConsumer(String id)
Retrieves the consumer associated with the specified producer identifier.
|
org.gatein.pc.federation.FederatingPortletInvoker |
getFederatingPortletInvoker()
Retrieves the
FederatingPortletInvoker used by this ConsumerRegistry to register / unregister consumers as PortletInvokers. |
void |
registerOrDeregisterConsumerWith(String id,
boolean register)
Attempts to register (if the specified boolean is
true) or deregister (otherwise) the consumer associated with the specified identifier with the associated
remote producer. |
void |
reloadConsumers()
Reloads consumers from persistence, re-initializing any cache from the persisted state.
|
String |
updateProducerInfo(ProducerInfo producerInfo)
Persists the changes made to ProducerInfo.
|
List<WSRPConsumer> getConfiguredConsumers()
WSRPConsumer getConsumer(String id)
id - the producer identifier of the consumer we want to retrieveorg.gatein.pc.federation.FederatingPortletInvoker getFederatingPortletInvoker()
FederatingPortletInvoker used by this ConsumerRegistry to register / unregister consumers as PortletInvokers. This is how the portal in which WSRP is
running can interact with remote portlets.FederatingPortletInvoker used by this ConsumerRegistryWSRPConsumer createConsumer(String id, Integer expirationCacheSeconds, String wsdlURL) throws ConsumerException
id - the producer identifier associated with this consumerexpirationCacheSeconds - the number of seconds before cached producer metadata is considered obsolete and needs to be retrieved again from the remote producerwsdlURL - the String representation of the URL where the producer WSDL is locatedConsumerException - if something went wrong during the creation, in particular, if attempting to create a consumer with an already existing identifiervoid activateConsumerWith(String id) throws ConsumerException
id - the identifier of the consumer to be activatedConsumerExceptionString updateProducerInfo(ProducerInfo producerInfo) throws ConsumerException
producerInfo - the ProducerInfo to persistnull otherwiseConsumerExceptionvoid deactivateConsumerWith(String id) throws ConsumerException
id - the identifier associated with the consumer to deactivateConsumerExceptionvoid registerOrDeregisterConsumerWith(String id, boolean register) throws ConsumerException
true) or deregister (otherwise) the consumer associated with the specified identifier with the associated
remote producer.id - the identifier of the consumer to de-/registerregister - true if a registration should be attempted, false if we want to deregister the specified consumerConsumerException - if something went wrong in particular during the WSRP interactionvoid destroyConsumer(String id) throws ConsumerException
id - the identifier associated with the consumer to destroyConsumerException - if something went wrong, in particular during potential WSRP interactionsvoid reloadConsumers()
boolean containsConsumer(String id)
id - the identifier of a consumer whose existence we want to check with this registryCollection<String> getConfiguredConsumersIds()
int getConfiguredConsumerNumber()
Copyright © 2006-2014 GateIn. All Rights Reserved.