org.apache.catalina.cluster.session
Class JvmRouteSessionIDBinderListener

java.lang.Object
  extended byorg.apache.catalina.cluster.session.JvmRouteSessionIDBinderListener
All Implemented Interfaces:
MessageListener

public class JvmRouteSessionIDBinderListener
extends java.lang.Object
implements MessageListener

Receive SessionID cluster change from other backup node after primary session node is failed.

Version:
1.0
Author:
Peter Rossbach

Field Summary
protected  CatalinaCluster cluster
           
protected static java.lang.String info
          The descriptive information about this implementation.
static org.apache.commons.logging.Log log
           
protected  boolean started
           
 
Constructor Summary
JvmRouteSessionIDBinderListener()
           
 
Method Summary
 boolean accept(ClusterMessage msg)
          Accept only SessionIDMessages
 boolean equals(java.lang.Object listener)
           
 CatalinaCluster getCluster()
          Returns the cluster the cluster deployer is associated with
 java.lang.String getInfo()
          Return descriptive information about this implementation.
 long getNumberOfSessions()
           
 int hashCode()
           
 void messageReceived(ClusterMessage msg)
          Callback from the cluster, when a message is received, The cluster will broadcast it invoking the messageReceived on the receiver.
 void setCluster(CatalinaCluster cluster)
          Associates the cluster deployer with a cluster
 void start()
          Add this Mover as Cluster Listener ( receiver)
 void stop()
          Remove this from Cluster Listener
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

public static org.apache.commons.logging.Log log

info

protected static final java.lang.String info
The descriptive information about this implementation.

See Also:
Constant Field Values

cluster

protected CatalinaCluster cluster

started

protected boolean started
Constructor Detail

JvmRouteSessionIDBinderListener

public JvmRouteSessionIDBinderListener()
Method Detail

getInfo

public java.lang.String getInfo()
Return descriptive information about this implementation.


getNumberOfSessions

public long getNumberOfSessions()
Returns:
Returns the numberOfSessions.

start

public void start()
           throws LifecycleException
Add this Mover as Cluster Listener ( receiver)

Throws:
LifecycleException

stop

public void stop()
          throws LifecycleException
Remove this from Cluster Listener

Throws:
LifecycleException

messageReceived

public void messageReceived(ClusterMessage msg)
Callback from the cluster, when a message is received, The cluster will broadcast it invoking the messageReceived on the receiver.

Specified by:
messageReceived in interface MessageListener
Parameters:
msg - ClusterMessage - the message received from the cluster

accept

public boolean accept(ClusterMessage msg)
Accept only SessionIDMessages

Specified by:
accept in interface MessageListener
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.

getCluster

public CatalinaCluster getCluster()
Description copied from interface: MessageListener
Returns the cluster the cluster deployer is associated with

Specified by:
getCluster in interface MessageListener
Returns:
CatalinaCluster

setCluster

public void setCluster(CatalinaCluster cluster)
Description copied from interface: MessageListener
Associates the cluster deployer with a cluster

Specified by:
setCluster in interface MessageListener
Parameters:
cluster - CatalinaCluster

equals

public boolean equals(java.lang.Object listener)
Specified by:
equals in interface MessageListener

hashCode

public int hashCode()
Specified by:
hashCode in interface MessageListener


Copyright © 2000-2005 Apache Software Foundation. All Rights Reserved.