|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.softamis.net.registry.impl.AbstractProvidingRegistry<K,V> org.softamis.net.registry.impl.DefaultProvidingRegistry<K,V>
K
- type of keys used to identify registry itemsV
- type of values stored in the registrypublic class DefaultProvidingRegistry<K extends java.io.Serializable,V extends java.io.Serializable>
Default implementation of ProvidingRegistry. It issues network notifications
when item is registered and unregistered, but delegates the actual details
of network communication to corresponding CommunicationHelper
. In addition,
it implements methods from RegistryEventProcessor
interface which allows this
class to handle requests for items that are published by this provider registry.
The CommunicationHelper used by instance of this class is source for events
processed by RegistryEventProcessor.
CommunicationHelper
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.softamis.net.registry.impl.AbstractProvidingRegistry |
---|
AbstractProvidingRegistry.ItemsStorage<K extends java.io.Serializable,V extends java.io.Serializable>, AbstractProvidingRegistry.MultiValueItemsStorage, AbstractProvidingRegistry.SingleValueItemsStorage |
Field Summary | |
---|---|
protected CommunicationHelper<K,V> |
fCommunicationHelper
Communication helper used to isolate details of network communication |
protected java.lang.String |
fDefaultMessageSignature
|
protected static org.apache.commons.logging.Log |
fLog
|
Fields inherited from class org.softamis.net.registry.impl.AbstractProvidingRegistry |
---|
fItemsStorage |
Constructor Summary | |
---|---|
DefaultProvidingRegistry()
|
|
DefaultProvidingRegistry(boolean aMultivalued)
|
Method Summary | |
---|---|
void |
close()
Closes ProvidingRegistry. |
protected void |
doAfterItemRegistered(K aItemKey,
V aItem)
Simply forces CommunicationHelper to issue notification about item registration |
protected void |
doAfterItemUnregistered(K aItemKey,
V aItem)
Simply forces CommunicationHelper to issue notification about item unregistration |
protected void |
doInit()
|
CommunicationHelper<K,V> |
getCommunicationHelper()
Returns communication helper used to isolate details of network communication |
java.lang.String |
getDefaultMessageSignature()
|
void |
init()
Method that performs initialization of the registry provider by additing it as listener to CommunicationHelper used to perform network communication. |
protected void |
insureCommunicationHelperSet()
|
void |
processItemInvalid(ItemEntry<K,V> aEntry)
Callback for processing CommunicationHelper.COMMAND_ITEM_INVALID notification |
void |
processItemRegistered(ItemEntry<K,V> aEntry)
Callback for processing CommunicationHelper.COMMAND_ITEM_REGISTERED notification |
void |
processItemsRequest(ItemEntry<K,V> aEntry)
Callback for processing CommunicationHelper.COMMAND_ITEM_REQUEST notification - typically will be processed by
ProvidingRegistry |
void |
processItemUnregistered(ItemEntry<K,V> aEntry)
Callback for processing CommunicationHelper.COMMAND_ITEM_UNREGISTERED notification |
void |
setCommunicationHelper(CommunicationHelper<K,V> aCommunicationHelper)
Sets communication helper used to isolate details of network communication |
void |
setDefaultMessageSignature(java.lang.String aDefaultMessageSignature)
|
Methods inherited from class org.softamis.net.registry.impl.AbstractProvidingRegistry |
---|
getOwnItems, isMultivalued, notifyAllRegistrations, registerItem, removeOwnItems, unregisterAllItems, unRegisterItem |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final org.apache.commons.logging.Log fLog
protected CommunicationHelper<K extends java.io.Serializable,V extends java.io.Serializable> fCommunicationHelper
protected java.lang.String fDefaultMessageSignature
Constructor Detail |
---|
public DefaultProvidingRegistry()
public DefaultProvidingRegistry(boolean aMultivalued)
Method Detail |
---|
public void processItemUnregistered(ItemEntry<K,V> aEntry)
RegistryEventProcessor
CommunicationHelper.COMMAND_ITEM_UNREGISTERED
notification
processItemUnregistered
in interface RegistryEventProcessor<K extends java.io.Serializable,V extends java.io.Serializable>
aEntry
- recevied item entrypublic void processItemRegistered(ItemEntry<K,V> aEntry)
RegistryEventProcessor
CommunicationHelper.COMMAND_ITEM_REGISTERED
notification
processItemRegistered
in interface RegistryEventProcessor<K extends java.io.Serializable,V extends java.io.Serializable>
aEntry
- recevied item entrypublic void processItemInvalid(ItemEntry<K,V> aEntry)
RegistryEventProcessor
CommunicationHelper.COMMAND_ITEM_INVALID
notification
processItemInvalid
in interface RegistryEventProcessor<K extends java.io.Serializable,V extends java.io.Serializable>
aEntry
- recevied item entrypublic void processItemsRequest(ItemEntry<K,V> aEntry)
RegistryEventProcessor
CommunicationHelper.COMMAND_ITEM_REQUEST
notification - typically will be processed by
ProvidingRegistry
processItemsRequest
in interface RegistryEventProcessor<K extends java.io.Serializable,V extends java.io.Serializable>
aEntry
- recevied item entryprotected void insureCommunicationHelperSet()
public void init()
protected void doInit()
public void close()
protected void doAfterItemUnregistered(K aItemKey, V aItem)
doAfterItemUnregistered
in class AbstractProvidingRegistry<K extends java.io.Serializable,V extends java.io.Serializable>
aItemKey
- key of the item which was unregisteredaItem
- the item unregisteredprotected void doAfterItemRegistered(K aItemKey, V aItem)
doAfterItemRegistered
in class AbstractProvidingRegistry<K extends java.io.Serializable,V extends java.io.Serializable>
aItemKey
- key of the item which was registeredaItem
- the item registeredpublic CommunicationHelper<K,V> getCommunicationHelper()
public void setCommunicationHelper(CommunicationHelper<K,V> aCommunicationHelper)
aCommunicationHelper
- communication helper used to isolate details of network communicationpublic java.lang.String getDefaultMessageSignature()
public void setDefaultMessageSignature(java.lang.String aDefaultMessageSignature)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |