gr.uoa.di.madgik.commons.channel.registry
Class ChannelRegistry
java.lang.Object
gr.uoa.di.madgik.commons.channel.registry.ChannelRegistry
public class ChannelRegistry
- extends java.lang.Object
ChannelRegistry is a utility class that acts as a container for channels.
It is the main connector point so that outlets can locate inlets
- Author:
- gpapanikos
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ChannelRegistry
public ChannelRegistry()
Register
public static ChannelRegistryKey Register(ChannelState State,
INozzleConfig Config,
java.lang.String RegisteringNozzle)
- Registers a channel and assigns it a referencable unique identifier.
the
IChannelProxy.SetChannelRegistryKey(ChannelRegistryKey)
is called so that now the inlet side of the channel has all the information needed
to complete its instantiation of inlet side proxy able to identify
fully the served channel. The cleanup module ChannelRegistryCleanUp
is registered with events produced by the registered ChannelState
so that it can cleanup the registry entries when the channel will be disposed.
- Parameters:
State
- the state that represents the main synchronization pointConfig
- the configuration of the created channelRegisteringNozzle
- the inlet nozzle
- Returns:
- the assigned channel registry key
Retrieve
public static ChannelRegistryEntry Retrieve(ChannelRegistryKey Key)
- Retrieves the associated to a registry key entry
- Parameters:
Key
- The registry key of which to retrieve the entry
- Returns:
- The associated entry or null if the registry does not contain
any record for the specific key