org.apache.catalina.ha.session

Class SessionMessageImpl

public class SessionMessageImpl extends ClusterMessageBase implements SessionMessage, Serializable

Session cluster message

Version: $Revision: 531471 $ $Date: 2007-04-23 16:11:44 +0200 (Mon, 23 Apr 2007) $

Author: Filip Hanik Peter Rossbach

Constructor Summary
SessionMessageImpl()
SessionMessageImpl(String contextName, int eventtype, byte[] session, String sessionID, String uniqueID)
Creates a session message.
Method Summary
StringgetContextName()
intgetEventType()
returns the event type
StringgetEventTypeString()
clear text event type name (for logging purpose only)
byte[]getSession()
StringgetSessionID()
longgetTimestamp()
StringgetUniqueId()
voidsetTimestamp(long time)
set message send time but only the first setting works (one shot)
voidsetUniqueId(String uniqueId)
StringtoString()

Constructor Detail

SessionMessageImpl

public SessionMessageImpl()

SessionMessageImpl

public SessionMessageImpl(String contextName, int eventtype, byte[] session, String sessionID, String uniqueID)
Creates a session message. Depending on what event type you want this message to represent, you populate the different parameters in the constructor
The following rules apply dependent on what event type argument you use:
EVT_SESSION_CREATED
The parameters: session, sessionID must be set.
EVT_SESSION_EXPIRED
The parameters: sessionID must be set.
EVT_SESSION_ACCESSED
The parameters: sessionID must be set.
EVT_SESSION_EXPIRED_XXXX
The parameters: sessionID must be set.
EVT_SESSION_DELTA
Send attribute delta (add,update,remove attribute or principal, ...).
EVT_ALL_SESSION_DATA
Send complete serializes session list
EVT_ALL_SESSION_TRANSFERCOMPLETE
send that all session state information are transfered after GET_ALL_SESSION received from this sender.

Parameters: contextName - the name of the context (application eventtype - one of the 8 event type defined in this class session - the serialized byte array of the session itself sessionID - the id that identifies this session uniqueID - the id that identifies this message

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()
clear text event type name (for logging purpose only)

Returns: the event type in a string representating, useful for debugging

getSession

public byte[] getSession()

Returns: the serialized data for the session

getSessionID

public String getSessionID()

Returns: the session ID for the session

getTimestamp

public long getTimestamp()

getUniqueId

public String getUniqueId()

setTimestamp

public void setTimestamp(long time)
set message send time but only the first setting works (one shot)

setUniqueId

public void setUniqueId(String uniqueId)

toString

public String toString()
Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.