org.apache.catalina.ha.session

Interface SessionMessage

public interface SessionMessage extends ClusterMessage, Serializable

Class Description:
The SessionMessage class is a class that is used when a session has been created, modified, expired in a Tomcat cluster node.
The following events are currently available:
Field Summary
static intEVT_ALL_SESSION_DATA
When a session state is transferred, this is the event.
static intEVT_ALL_SESSION_TRANSFERCOMPLETE
When a session state is complete transferred, this is the event.
static intEVT_GET_ALL_SESSIONS
Event type used when a server comes online for the first time.
static intEVT_SESSION_ACCESSED
Event type used when a session has been accessed (ie, last access time has been updated.
static intEVT_SESSION_CREATED
Event type used when a session has been created on a node
static intEVT_SESSION_DELTA
Event type used when an attribute has been added to a session, the attribute will be sent to all the other nodes in the cluster
static intEVT_SESSION_EXPIRED
Event type used when a session has expired
Method Summary
StringgetContextName()
intgetEventType()
returns the event type
StringgetEventTypeString()
byte[]getSession()
StringgetSessionID()

Field Detail

EVT_ALL_SESSION_DATA

public static final int EVT_ALL_SESSION_DATA
When a session state is transferred, this is the event.

EVT_ALL_SESSION_TRANSFERCOMPLETE

public static final int EVT_ALL_SESSION_TRANSFERCOMPLETE
When a session state is complete transferred, this is the event.

EVT_GET_ALL_SESSIONS

public static final int EVT_GET_ALL_SESSIONS
Event type used when a server comes online for the first time. The first thing the newly started server wants to do is to grab the all the sessions from one of the nodes and keep the same state in there

EVT_SESSION_ACCESSED

public static final int EVT_SESSION_ACCESSED
Event type used when a session has been accessed (ie, last access time has been updated. This is used so that the replicated sessions will not expire on the network

EVT_SESSION_CREATED

public static final int EVT_SESSION_CREATED
Event type used when a session has been created on a node

EVT_SESSION_DELTA

public static final int EVT_SESSION_DELTA
Event type used when an attribute has been added to a session, the attribute will be sent to all the other nodes in the cluster

EVT_SESSION_EXPIRED

public static final int EVT_SESSION_EXPIRED
Event type used when a session has expired

Method Detail

getContextName

public String getContextName()

getEventType

public int getEventType()
returns the event type

Returns: one of the event types EVT_XXXX

getEventTypeString

public String getEventTypeString()

getSession

public byte[] getSession()

Returns: the serialized data for the session

getSessionID

public String getSessionID()

Returns: the session ID for the session

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