public interface ConsumerRegistrySPI extends ConsumerRegistry
| Modifier and Type | Method and Description |
|---|---|
WSRPConsumer |
createConsumerFrom(ProducerInfo producerInfo,
boolean putInCache)
Creates a consumer from the specified ProducerInfo, caching it if so specified.
|
void |
delete(ProducerInfo info)
Deletes the specified ProducerInfo from persistence.
|
void |
deregisterWithFederatingPortletInvoker(WSRPConsumer consumer)
Deregisters the specified WSRPConsumer with the FederatingPortletInvoker.
|
MigrationService |
getMigrationService() |
long |
getPersistedLastModifiedForProducerInfoWith(String id)
Checks the last modification time that was persisted for the ProducerInfo identified by the specified identifier.
|
Iterator<ProducerInfo> |
getProducerInfosFromStorage()
Retrieves all ProducerInfos currently persisted from the persistent store.
|
SessionRegistry |
getSessionRegistry() |
ProducerInfo |
loadProducerInfo(String id)
Loads the ProducerInfo associated with the specified identifier from the persistent state.
|
void |
registerWithFederatingPortletInvoker(WSRPConsumer consumer)
Registers the specified WSRPConsumer with the FederatingPortletInvoker.
|
void |
save(ProducerInfo info,
String messageOnError)
Saves for the first time the specified ProducerInfo to persistence, providing a message in case an error happens.
|
void |
setFederatingPortletInvoker(org.gatein.pc.federation.FederatingPortletInvoker federatingPortletInvoker) |
void |
setMigrationService(MigrationService migrationService) |
void |
setSessionEventBroadcaster(SessionEventBroadcaster sessionEventBroadcaster) |
void |
setSessionRegistry(SessionRegistry sessionRegistry) |
void |
start()
Gets this ConsumerRegistry ready to work, in particular, loads the consumers from persistence and starts them, registering the active ones with the FederatingPortletInvoker.
|
void |
stop()
Stops all consumers, deregistering them with the FederatingPortletInvoker.
|
String |
update(ProducerInfo producerInfo)
Persists the changes made to an already persisted ProducerInfo.
|
activateConsumerWith, containsConsumer, createConsumer, deactivateConsumerWith, destroyConsumer, getConfiguredConsumerNumber, getConfiguredConsumers, getConfiguredConsumersIds, getConsumer, getFederatingPortletInvoker, registerOrDeregisterConsumerWith, reloadConsumers, updateProducerInfovoid setSessionEventBroadcaster(SessionEventBroadcaster sessionEventBroadcaster)
void setFederatingPortletInvoker(org.gatein.pc.federation.FederatingPortletInvoker federatingPortletInvoker)
MigrationService getMigrationService()
void setMigrationService(MigrationService migrationService)
SessionRegistry getSessionRegistry()
void setSessionRegistry(SessionRegistry sessionRegistry)
void start()
throws Exception
Exceptionvoid stop()
throws Exception
Exceptionvoid save(ProducerInfo info, String messageOnError) throws ConsumerException
info - the ProducerInfo to persistmessageOnError - the message to pass along in case an error happensConsumerExceptionvoid delete(ProducerInfo info) throws ConsumerException
info - the ProducerInfo to deleteConsumerExceptionString update(ProducerInfo producerInfo)
producerInfo - the ProducerInfo which modifications we want to persistnull otherwiseIterator<ProducerInfo> getProducerInfosFromStorage()
ProducerInfo loadProducerInfo(String id)
id - the identifier of the ProducerInfo to loadnull if no such ProducerInfo is currently persistedWSRPConsumer createConsumerFrom(ProducerInfo producerInfo, boolean putInCache)
producerInfo - the ProducerInfo to create a consumer fromputInCache - whether to cache the newly created consumervoid registerWithFederatingPortletInvoker(WSRPConsumer consumer)
consumer - the WSRPConsumer to registervoid deregisterWithFederatingPortletInvoker(WSRPConsumer consumer)
consumer - the WSRPConsumer to deregisterlong getPersistedLastModifiedForProducerInfoWith(String id)
id - the identifier of the ProducerInfo we want to checkCopyright © 2006-2014 GateIn. All Rights Reserved.