org.apache.catalina.cluster.session
Class SessionMessageImpl

java.lang.Object
  extended byorg.apache.catalina.cluster.session.SessionMessageImpl
All Implemented Interfaces:
ClusterMessage, java.io.Serializable, SessionMessage

public class SessionMessageImpl
extends java.lang.Object
implements SessionMessage, java.io.Serializable

Title:

Description:

Copyright: Copyright (c) 2004

Company:

Version:
1.0
Author:
not attributable
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.apache.catalina.cluster.session.SessionMessage
EVT_ALL_SESSION_DATA, EVT_GET_ALL_SESSIONS, EVT_SESSION_ACCESSED, EVT_SESSION_CREATED, EVT_SESSION_DELTA, EVT_SESSION_EXPIRED
 
Constructor Summary
SessionMessageImpl()
           
SessionMessageImpl(java.lang.String contextName, int eventtype, byte[] session, java.lang.String sessionID, java.lang.String uniqueID)
           
 
Method Summary
 Member getAddress()
          Get the address that this message originated from.
 java.lang.String getContextName()
           
 int getEventType()
          returns the event type
 java.lang.String getEventTypeString()
           
 byte[] getSession()
           
 java.lang.String getSessionID()
           
 long getTimestamp()
          Timestamp message
 java.lang.String getUniqueId()
          Each message must have a unique ID, in case of using async replication, and a smart queue, this id is used to replace messages not yet sent
 void setAddress(Member src)
          Use this method to set the address that this message originated from.
 void setTimestamp(long time)
          the value of the attribute
 void setUniqueId(java.lang.String uniqueId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SessionMessageImpl

public SessionMessageImpl()

SessionMessageImpl

public SessionMessageImpl(java.lang.String contextName,
                          int eventtype,
                          byte[] session,
                          java.lang.String sessionID,
                          java.lang.String uniqueID)
Method Detail

getEventType

public int getEventType()
returns the event type

Specified by:
getEventType in interface SessionMessage
Returns:
one of the event types EVT_XXXX

getSession

public byte[] getSession()
Specified by:
getSession in interface SessionMessage
Returns:
the serialized data for the session

getSessionID

public java.lang.String getSessionID()
Specified by:
getSessionID in interface SessionMessage
Returns:
the session ID for the session

setTimestamp

public void setTimestamp(long time)
the value of the attribute

Specified by:
setTimestamp in interface ClusterMessage
Parameters:
time - long

getTimestamp

public long getTimestamp()
Description copied from interface: ClusterMessage
Timestamp message

Specified by:
getTimestamp in interface ClusterMessage
Returns:
long

getEventTypeString

public java.lang.String getEventTypeString()
Specified by:
getEventTypeString in interface SessionMessage
Returns:
the event type in a string representating, useful for debugging

getAddress

public Member getAddress()
Get the address that this message originated from. This would be set if the message was being relayed from a host other than the one that originally sent it.

Specified by:
getAddress in interface ClusterMessage

setAddress

public void setAddress(Member src)
Use this method to set the address that this message originated from. This can be used when re-sending the EVT_GET_ALL_SESSIONS message to another machine in the group.

Specified by:
setAddress in interface ClusterMessage
Parameters:
src - Member

getContextName

public java.lang.String getContextName()
Specified by:
getContextName in interface SessionMessage

getUniqueId

public java.lang.String getUniqueId()
Description copied from interface: ClusterMessage
Each message must have a unique ID, in case of using async replication, and a smart queue, this id is used to replace messages not yet sent

Specified by:
getUniqueId in interface ClusterMessage
Returns:
String

setUniqueId

public void setUniqueId(java.lang.String uniqueId)


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