Package org.apache.catalina.ha
Class ClusterListener
- java.lang.Object
- 
- org.apache.catalina.ha.ClusterListener
 
- 
- All Implemented Interfaces:
- ChannelListener
 - Direct Known Subclasses:
- ClusterSessionListener,- FarmWarDeployer
 
 public abstract class ClusterListener extends java.lang.Object implements ChannelListener Receive SessionID cluster change from other backup node after primary session node is failed.- Author:
- Peter Rossbach
 
- 
- 
Field SummaryFields Modifier and Type Field Description protected CatalinaClusterclusterThe string manager for this package.
 - 
Constructor SummaryConstructors Constructor Description ClusterListener()
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleanaccept(java.io.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 SessionIDMessagesCatalinaClustergetCluster()voidmessageReceived(java.io.Serializable msg, Member member)Receive a message from the channelabstract voidmessageReceived(ClusterMessage msg)Callback 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.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.apache.catalina.tribes.ChannelListenerequals, hashCode
 
- 
 
- 
- 
- 
Field Detail- 
clusterprotected CatalinaCluster cluster The string manager for this package.
 
- 
 - 
Method Detail- 
getClusterpublic CatalinaCluster getCluster() 
 - 
setClusterpublic void setCluster(CatalinaCluster cluster) 
 - 
messageReceivedpublic final void messageReceived(java.io.Serializable msg, Member member)Description copied from interface:ChannelListenerReceive a message from the channel- Specified by:
- messageReceivedin interface- ChannelListener
- Parameters:
- msg- Serializable
- member- - the source of the message
 
 - 
acceptpublic final boolean accept(java.io.Serializable msg, Member member)Description copied from interface:ChannelListenerInvoked by the channel to determine if the listener will process this message or not.- Specified by:
- acceptin interface- ChannelListener
- Parameters:
- msg- Serializable
- member- Member
- Returns:
- boolean
 
 - 
messageReceivedpublic abstract void messageReceived(ClusterMessage msg) 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
 
 - 
acceptpublic abstract boolean accept(ClusterMessage msg) 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.
 
 
- 
 
-