org.softamis.net.registry.spring
Class DefaultProvidingRegistry<K extends java.io.Serializable,V extends java.io.Serializable>

java.lang.Object
  extended by org.softamis.net.registry.impl.AbstractProvidingRegistry<K,V>
      extended by org.softamis.net.registry.impl.DefaultProvidingRegistry<K,V>
          extended by org.softamis.net.registry.spring.DefaultProvidingRegistry<K,V>
All Implemented Interfaces:
java.util.EventListener, RegistryEventProcessor<K,V>, DiscoverableProvidingRegistry<K,V>, ProvidingRegistry<K,V>, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationListener

public class DefaultProvidingRegistry<K extends java.io.Serializable,V extends java.io.Serializable>
extends DefaultProvidingRegistry<K,V>
implements org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationListener

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.

Author:
Andrew Sazonov
See Also:
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 static org.apache.commons.logging.Log fLog
           
 
Fields inherited from class org.softamis.net.registry.impl.DefaultProvidingRegistry
fCommunicationHelper, fDefaultMessageSignature
 
Fields inherited from class org.softamis.net.registry.impl.AbstractProvidingRegistry
fItemsStorage
 
Constructor Summary
DefaultProvidingRegistry()
           
DefaultProvidingRegistry(boolean aMultiValued)
           
 
Method Summary
 void afterPropertiesSet()
          Invoked by Spring and performs checking that CommunicationHelper was actually set.
 void onApplicationEvent(org.springframework.context.ApplicationEvent aEvent)
           
 
Methods inherited from class org.softamis.net.registry.impl.DefaultProvidingRegistry
close, doAfterItemRegistered, doAfterItemUnregistered, doInit, getCommunicationHelper, getDefaultMessageSignature, init, insureCommunicationHelperSet, processItemInvalid, processItemRegistered, processItemsRequest, processItemUnregistered, setCommunicationHelper, setDefaultMessageSignature
 
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

fLog

protected static final org.apache.commons.logging.Log fLog
Constructor Detail

DefaultProvidingRegistry

public DefaultProvidingRegistry()

DefaultProvidingRegistry

public DefaultProvidingRegistry(boolean aMultiValued)
Method Detail

afterPropertiesSet

public void afterPropertiesSet()
                        throws java.lang.Exception
Invoked by Spring and performs checking that CommunicationHelper was actually 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