org.eclipse.swordfish.core.util
Interface Registry<T>

Type Parameters:
T - Type of components registered in the present registry
All Superinterfaces:
ReadOnlyRegistry<T>
All Known Implementing Classes:
ConfigurationConsumerRegistry, EventHandlerRegistry, InterceptorExceptionListenerRegistry, InterceptorRegistry, PollableConfigurationSourceRegistry, RegistryImpl

public interface Registry<T>
extends ReadOnlyRegistry<T>

Handles the registration of the Swordfish components like interceptors, strategies, exceptionListeners.


Method Summary
 void register(T item, java.util.Map<java.lang.String,?> properties)
          Perform registration of an item with its properties.
 void unregister(T item, java.util.Map<java.lang.String,?> properties)
          Unregister an item.
 
Methods inherited from interface org.eclipse.swordfish.core.util.ReadOnlyRegistry
getKeySet, getProperties
 

Method Detail

register

void register(T item,
              java.util.Map<java.lang.String,?> properties)
              throws SwordfishException
Perform registration of an item with its properties.

Parameters:
item - The key i.e. the component for which properties are registered.
properties - The properties of the registered item. Must not be null, but if there are no properties, an empty Map must be provided.
Throws:
SwordfishException - risen in case of double registration of the same item, an invalid item, or an invalid properties argument.

unregister

void unregister(T item,
                java.util.Map<java.lang.String,?> properties)
                throws SwordfishException
Unregister an item.

Parameters:
item - - to be unregistered. When the item is not registered, nothing happens.
Throws:
SwordfishException - if an item cannot be unregistered due to the internal state of the system.