Interface IClusterChannelStateObserver
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
ClusterChannelStateObserver
An observer that can be used to listen for changes to the channel state, such as when the connection a node was
established or cut.
- Since:
- 3.1.0
- Author:
- XIMA MEDIA GmbH
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addListener
(IClusterChannelStateListener listener) Adds a listener that will be invoked when an event related to a change in a channel occurs.void
closed
(ChannelCommunicationData channelData) Method that should be called when the channel was closed.void
connected
(ChannelCommunicationData channelData) Method that should be called when the connection to a node was established.void
disconnected
(ChannelCommunicationData channelData) Method that should be called when the connection to a node was cut.void
removeListener
(IClusterChannelStateListener listener) Removes a listener previously added viaaddListener(IClusterChannelStateListener)
.
-
Method Details
-
connected
Method that should be called when the connection to a node was established. This method should invoke the appropriate listeners added viaaddListener(IClusterChannelStateListener)
.- Parameters:
channelData
- Details about the current state of the channel for the node.
-
disconnected
Method 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 viaaddListener(IClusterChannelStateListener)
.- Parameters:
channelData
- Details about the current state of the channel for the node.
-
closed
Method 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 viaaddListener(IClusterChannelStateListener)
.- Parameters:
channelData
- Details about the current state of the channel for the node.
-
addListener
Adds a listener that will be invoked when an event related to a change in a channel occurs.- Parameters:
listener
- Listener to add that will be invoked when an event occurs.
-
removeListener
Removes a listener previously added viaaddListener(IClusterChannelStateListener)
.- Parameters:
listener
- Listener that should not be invoked anymore.
-