Package org.apache.catalina.ha
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
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanaccept(Serializable msg, Member member) Invoked by the channel to determine if the listener will process this message or not.abstract booleanaccept(ClusterMessage msg) Accept only SessionIDMessagesfinal voidmessageReceived(Serializable msg, Member member) Receive a message from the channelabstract voidCallback from the cluster, when a message is received, The cluster will broadcast it invoking the messageReceived on the receiver.voidsetCluster(CatalinaCluster cluster) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.catalina.tribes.ChannelListener
equals, hashCode
-
Field Details
-
cluster
The string manager for this package.
-
-
Constructor Details
-
ClusterListener
public ClusterListener()
-
-
Method Details
-
getCluster
-
setCluster
-
messageReceived
Description copied from interface:ChannelListenerReceive a message from the channel- Specified by:
messageReceivedin interfaceChannelListener- Parameters:
msg- Serializablemember- - the source of the message
-
accept
Description copied from interface:ChannelListenerInvoked by the channel to determine if the listener will process this message or not.- Specified by:
acceptin 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- ClusterMessage - the message received from the cluster
-
accept
Accept only SessionIDMessages- Parameters:
msg- ClusterMessage- Returns:
- boolean - returns true to indicate that messageReceived should be invoked. If false is returned, the messageReceived method will not be invoked.
-