Package org.apache.catalina.ha.session
Interface SessionMessage
- All Superinterfaces:
- ClusterMessage,- Serializable
- All Known Implementing Classes:
- SessionMessageImpl
The SessionMessage interface is used when a session has been created, modified, expired in a Tomcat cluster node.
 
The following events are currently available:
- public static final int EVT_SESSION_CREATED
- public static final int EVT_SESSION_EXPIRED
- public static final int EVT_SESSION_ACCESSED
- public static final int EVT_GET_ALL_SESSIONS
- public static final int EVT_SESSION_DELTA
- public static final int EVT_ALL_SESSION_DATA
- public static final int EVT_ALL_SESSION_TRANSFERCOMPLETE
- public static final int EVT_CHANGE_SESSION_ID
- public static final int EVT_ALL_SESSION_NOCONTEXTMANAGER
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final intWhen a session state is transferred, this is the event.static final intEvent type used when context manager doesn't exist.static final intWhen a session state is complete transferred, this is the event.static final intEvent type used when a sessionID has been changed.static final intEvent type used when a server comes online for the first time.static final intEvent type used when a session has been accessed (ie, last access time has been updated.static final intEvent type used when a session has been created on a nodestatic final intEvent type used when an attribute has been added to a session, the attribute will be sent to all the other nodes in the clusterstatic final intEvent type used when a session has expired
- 
Method SummaryModifier and TypeMethodDescriptionintreturns the event typebyte[]Methods inherited from interface org.apache.catalina.ha.ClusterMessagegetAddress, getTimestamp, getUniqueId, setAddress, setTimestamp
- 
Field Details- 
EVT_SESSION_CREATEDstatic final int EVT_SESSION_CREATEDEvent type used when a session has been created on a node- See Also:
 
- 
EVT_SESSION_EXPIREDstatic final int EVT_SESSION_EXPIREDEvent type used when a session has expired- See Also:
 
- 
EVT_SESSION_ACCESSEDstatic final int EVT_SESSION_ACCESSEDEvent 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- See Also:
 
- 
EVT_GET_ALL_SESSIONSstatic final int EVT_GET_ALL_SESSIONSEvent 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- See Also:
 
- 
EVT_SESSION_DELTAstatic final int EVT_SESSION_DELTAEvent type used when an attribute has been added to a session, the attribute will be sent to all the other nodes in the cluster- See Also:
 
- 
EVT_ALL_SESSION_DATAstatic final int EVT_ALL_SESSION_DATAWhen a session state is transferred, this is the event.- See Also:
 
- 
EVT_ALL_SESSION_TRANSFERCOMPLETEstatic final int EVT_ALL_SESSION_TRANSFERCOMPLETEWhen a session state is complete transferred, this is the event.- See Also:
 
- 
EVT_CHANGE_SESSION_IDstatic final int EVT_CHANGE_SESSION_IDEvent type used when a sessionID has been changed.- See Also:
 
- 
EVT_ALL_SESSION_NOCONTEXTMANAGERstatic final int EVT_ALL_SESSION_NOCONTEXTMANAGEREvent type used when context manager doesn't exist. This is used when the manager which send a session state does not exist.- See Also:
 
 
- 
- 
Method Details- 
getContextNameString getContextName()
- 
getEventTypeStringString getEventTypeString()
- 
getEventTypeint getEventType()returns the event type- Returns:
- one of the event types EVT_XXXX
 
- 
getSessionbyte[] getSession()- Returns:
- the serialized data for the session
 
- 
getSessionIDString getSessionID()- Returns:
- the session ID for the session
 
 
-