JBoss EJB client 1.0.5.Final

org.jboss.ejb.client
Class SessionID

java.lang.Object
  extended by org.jboss.ejb.client.SessionID
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
BasicSessionID, UnknownSessionID

public abstract class SessionID
extends Object
implements Serializable

A session ID for a stateful EJB. Session IDs can be stored in multiple formats with different characteristics.

Author:
David M. Lloyd
See Also:
Serialized Form

Nested Class Summary
static class SessionID.Serialized
          Serialized representation of a session ID..
 
Method Summary
static SessionID createSessionID(byte[] encoded)
          Create a session ID object for the given encoded representation.
 boolean equals(Object other)
          Determine whether this object is equal to another.
 byte[] getEncodedForm()
          Get a copy of the encoded form of this session ID.
protected  byte[] getEncodedFormRaw()
          Get the encoded form of this session ID.
 int hashCode()
           
 String toString()
           
protected  Object writeReplace()
          Substitute this session ID with a serialized representation.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

getEncodedForm

public byte[] getEncodedForm()
Get a copy of the encoded form of this session ID.

Returns:
the copy of the encoded form

getEncodedFormRaw

protected byte[] getEncodedFormRaw()
Get the encoded form of this session ID. Note that callers must take care to avoid modifying the encoded form.

Returns:
the encoded form

equals

public final boolean equals(Object other)
Determine whether this object is equal to another. Session IDs are equal if their encoded form is equal and the class is equal.

Overrides:
equals in class Object
Parameters:
other - the other object
Returns:
true if they are equal, false otherwise

hashCode

public final int hashCode()
Overrides:
hashCode in class Object

createSessionID

public static SessionID createSessionID(byte[] encoded)
Create a session ID object for the given encoded representation.

Parameters:
encoded - the encoded representation
Returns:
the session ID object

writeReplace

protected final Object writeReplace()
Substitute this session ID with a serialized representation.

Returns:
the serialized representation

toString

public String toString()
Overrides:
toString in class Object

JBoss EJB client 1.0.5.Final

Copyright © 2012 JBoss by Red Hat. All Rights Reserved.