Package de.xima.fc.cluster.observer
Class ClusterChannelStateObserver
java.lang.Object
de.xima.fc.cluster.observer.ClusterChannelStateObserver
- All Implemented Interfaces:
IClusterChannelStateObserver,Serializable
Default implementation of a
IClusterChannelStateObserver that delegates to the registered
IClusterChannelStateListener.- Since:
- 3.1.0
- Author:
- XIMA MEDIA GmbH
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(IClusterChannelStateListener listener) Adds a listener that will be invoked when an event related to a change in a channel occurs.voidclosed(ChannelCommunicationData channelData) Method that should be called when the channel was closed.voidconnected(ChannelCommunicationData channelData) Method that should be called when the connection to a node was established.voiddisconnected(ChannelCommunicationData channelData) Method that should be called when the connection to a node was cut.voidremoveListener(IClusterChannelStateListener listener) Removes a listener previously added viaIClusterChannelStateObserver.addListener(IClusterChannelStateListener).
-
Constructor Details
-
ClusterChannelStateObserver
public ClusterChannelStateObserver()
-
-
Method Details
-
connected
Description copied from interface:IClusterChannelStateObserverMethod that should be called when the connection to a node was established. This method should invoke the appropriate listeners added viaIClusterChannelStateObserver.addListener(IClusterChannelStateListener).- Specified by:
connectedin interfaceIClusterChannelStateObserver- Parameters:
channelData- Details about the current state of the channel for the node.
-
disconnected
Description copied from interface:IClusterChannelStateObserverMethod that should be called when the connection to a node was cut. As long as the channel is not closed, the connection could be established later again. This method should invoke the appropriate listeners added viaIClusterChannelStateObserver.addListener(IClusterChannelStateListener).- Specified by:
disconnectedin interfaceIClusterChannelStateObserver- Parameters:
channelData- Details about the current state of the channel for the node.
-
closed
Description copied from interface:IClusterChannelStateObserverMethod that should be called when the channel was closed. Once the channel is closed, no more connections can be established anymore. This method should invoke the appropriate listeners added viaIClusterChannelStateObserver.addListener(IClusterChannelStateListener).- Specified by:
closedin interfaceIClusterChannelStateObserver- Parameters:
channelData- Details about the current state of the channel for the node.
-
addListener
Description copied from interface:IClusterChannelStateObserverAdds a listener that will be invoked when an event related to a change in a channel occurs.- Specified by:
addListenerin interfaceIClusterChannelStateObserver- Parameters:
listener- Listener to add that will be invoked when an event occurs.
-
removeListener
Description copied from interface:IClusterChannelStateObserverRemoves a listener previously added viaIClusterChannelStateObserver.addListener(IClusterChannelStateListener).- Specified by:
removeListenerin interfaceIClusterChannelStateObserver- Parameters:
listener- Listener that should not be invoked anymore.
-