|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.softamis.net.registry.impl.AbstractProvidingRegistry<K,V>
K - type of keys used to identify registry itemsV - type of values stored in the registrypublic abstract class AbstractProvidingRegistry<K extends java.io.Serializable,V extends java.io.Serializable>
Base abstract implementation of ProvidingRegistry.
ProvidingRegistry| Nested Class Summary | |
|---|---|
protected static interface |
AbstractProvidingRegistry.ItemsStorage<K extends java.io.Serializable,V extends java.io.Serializable>
Interface with represents storage used by registry to store registered values internally |
protected class |
AbstractProvidingRegistry.MultiValueItemsStorage
|
protected class |
AbstractProvidingRegistry.SingleValueItemsStorage
Implementation of storage wich allows only one value be registered under the given key. |
| Field Summary | |
|---|---|
protected AbstractProvidingRegistry.ItemsStorage<K,V> |
fItemsStorage
Storage where registered items are stored internally |
protected static org.apache.commons.logging.Log |
fLog
|
| Constructor Summary | |
|---|---|
protected |
AbstractProvidingRegistry(boolean aMultivalue)
Constructor which creates providing registry and initializes internal storage of registered items. |
| Method Summary | |
|---|---|
protected abstract void |
doAfterItemRegistered(K aItemKey,
V aItem)
Performs post-processing of item registration. |
protected abstract void |
doAfterItemUnregistered(K aItemKey,
V aItem)
Performs post-processing of item unregistration. |
java.util.List<java.util.Map.Entry<K,V>> |
getOwnItems()
Returns items that were published by this provider registry |
boolean |
isMultivalued()
Allows to determine whether storage allows to register several values under the same key |
void |
notifyAllRegistrations()
Forces registry to issue notification for all registered items. |
void |
registerItem(K aItemKey,
V aItem)
Registers item stored under given key. |
protected void |
removeOwnItems()
Method that issues notification about unregistration of all items which were previously registred via this particular ProviderReqistry |
void |
unregisterAllItems()
|
void |
unRegisterItem(K aItemKey)
Performs un-registration of the item under given key. |
| 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 AbstractProvidingRegistry.ItemsStorage<K extends java.io.Serializable,V extends java.io.Serializable> fItemsStorage
| Constructor Detail |
|---|
protected AbstractProvidingRegistry(boolean aMultivalue)
aMultivalue - indicates whether only one value could be registered per key or
several ones. If value is true, it's possible to register several items
on the same key| Method Detail |
|---|
public boolean isMultivalued()
public void registerItem(K aItemKey,
V aItem)
registerItem in interface ProvidingRegistry<K extends java.io.Serializable,V extends java.io.Serializable>aItemKey - key of the item to be registeredaItem - the item to be registeredpublic void notifyAllRegistrations()
notifyAllRegistrations in interface ProvidingRegistry<K extends java.io.Serializable,V extends java.io.Serializable>public void unRegisterItem(K aItemKey)
unRegisterItem in interface ProvidingRegistry<K extends java.io.Serializable,V extends java.io.Serializable>aItemKey - item to unregister
protected abstract void doAfterItemUnregistered(K aItemKey,
V aItem)
aItemKey - key of the item unregisteredaItem - the item which is unregistered
protected abstract void doAfterItemRegistered(K aItemKey,
V aItem)
aItemKey - key of the item registeredaItem - the item which is registeredpublic java.util.List<java.util.Map.Entry<K,V>> getOwnItems()
getOwnItems in interface DiscoverableProvidingRegistry<K extends java.io.Serializable,V extends java.io.Serializable>protected void removeOwnItems()
public void unregisterAllItems()
unregisterAllItems in interface ProvidingRegistry<K extends java.io.Serializable,V extends java.io.Serializable>
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||