Class ClusterListener
java.lang.Object
org.apache.catalina.ha.ClusterListener
- All Implemented Interfaces:
ChannelListener
- Direct Known Subclasses:
ClusterSessionListener
,FarmWarDeployer
Receive SessionID cluster change from other backup node after primary session node is failed.
- Author:
- Peter Rossbach
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
accept
(Serializable msg, Member member) Invoked by the channel to determine if the listener will process this message or not.abstract boolean
accept
(ClusterMessage msg) Accept only a certain type of messages.final void
messageReceived
(Serializable msg, Member member) Receive a message from the channelabstract void
Callback from the cluster, when a message is received, The cluster will broadcast it invoking the messageReceived on the receiver.void
setCluster
(CatalinaCluster cluster)
-
Field Details
-
cluster
-
-
Constructor Details
-
ClusterListener
public ClusterListener()
-
-
Method Details
-
getCluster
-
setCluster
-
messageReceived
Description copied from interface:ChannelListener
Receive a message from the channel- Specified by:
messageReceived
in interfaceChannelListener
- Parameters:
msg
- Serializablemember
- - the source of the message
-
accept
Description copied from interface:ChannelListener
Invoked by the channel to determine if the listener will process this message or not.- Specified by:
accept
in interfaceChannelListener
- Parameters:
msg
- Serializablemember
- Member- Returns:
- boolean
-
messageReceived
Callback from the cluster, when a message is received, The cluster will broadcast it invoking the messageReceived on the receiver.- Parameters:
msg
- the message received from the cluster
-
accept
Accept only a certain type of messages.- Parameters:
msg
- the message- Returns:
true
to indicate that messageReceived should be invoked. Iffalse
is returned, the messageReceived method will not be invoked.
-