org.softamis.net.registry.spring
Class DefaultConsumingRegistry<K extends java.io.Serializable,V extends java.io.Serializable>
java.lang.Object
org.softamis.net.registry.impl.AbstractConsumingRegistry<K,V>
org.softamis.net.registry.impl.DefaultConsumingRegistry<K,V>
org.softamis.net.registry.spring.DefaultConsumingRegistry<K,V>
- All Implemented Interfaces:
- java.util.EventListener, RegistryEventProcessor<K,V>, ConsumingRegistry<K,V>, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationListener
public class DefaultConsumingRegistry<K extends java.io.Serializable,V extends java.io.Serializable>
- extends DefaultConsumingRegistry<K,V>
- implements org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationListener
Default implementation of ConsumingRegistry
.
It issues network notifications
when item for given key should be requested or given item should be invalidated.
To isolate details of network communication, it delegates the actual details
of network communication to corresponding CommunicationHelper
. In addition,
it implements methods from RegistryEventProcessor
interface which allows this
class to handle notifications about item registrations/undregistration that are
issued by provider registry and also notifications about items invalidation which
could be issued by another ConsumerRegistries.
The CommunicationHelper
used by instance of this class is source for events
processed by RegistryEventProcessor.
- Author:
- Andrew Sazonov
- See Also:
CommunicationHelper
Field Summary |
protected static org.apache.commons.logging.Log |
fLog
|
Method Summary |
void |
afterPropertiesSet()
Invoked by Spring and is used to check that CommunicationHelper is set. |
void |
onApplicationEvent(org.springframework.context.ApplicationEvent aEvent)
|
Methods inherited from class org.softamis.net.registry.impl.DefaultConsumingRegistry |
addRegistryEventProcessor, checkExternalItemUnregistration, close, discoverItems, doGetItems, doInit, doMarkItemInvalid, doRequestItems, getCommunicationHelper, getDefaultMessageSignature, getDiscoveringTimeout, getKeys, init, insureCommunicationHelperSet, isClosed, isIssueRequestForInvalidatedService, processItemInvalid, processItemRegistered, processItemsRequest, processItemUnregistered, removeRegistryEventProcessor, setCommunicationHelper, setDefaultMessageSignature, setDiscoveringTimeout, setIssueRequestForInvalidatedService |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
fLog
protected static final org.apache.commons.logging.Log fLog
DefaultConsumingRegistry
public DefaultConsumingRegistry()
afterPropertiesSet
public void afterPropertiesSet()
throws java.lang.Exception
- Invoked by Spring and is used to check that CommunicationHelper is set.
- Specified by:
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
- Throws:
java.lang.Exception
onApplicationEvent
public void onApplicationEvent(org.springframework.context.ApplicationEvent aEvent)
- Specified by:
onApplicationEvent
in interface org.springframework.context.ApplicationListener