JBoss EJB client 1.0.5.Final

org.jboss.ejb.client
Class TransactionID

java.lang.Object
  extended by org.jboss.ejb.client.TransactionID
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
UserTransactionID, XidTransactionID

public abstract class TransactionID
extends Object
implements Serializable

A transaction ID for an invocation. Transaction IDs can be stored in multiple formats with different characteristics.

Author:
David M. Lloyd
See Also:
Serialized Form

Nested Class Summary
static class TransactionID.Serialized
          Serialized representation of a transaction ID.
 
Field Summary
static String PRIVATE_DATA_KEY
           
 
Method Summary
static TransactionID createTransactionID(byte[] encoded)
          Create a transaction 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 transaction ID.
protected  byte[] getEncodedFormRaw()
          Get the encoded form of this transaction ID.
 int hashCode()
           
protected  Object writeReplace()
          Substitute this transaction ID with a serialized representation.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PRIVATE_DATA_KEY

public static final String PRIVATE_DATA_KEY
See Also:
Constant Field Values
Method Detail

getEncodedForm

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

Returns:
the copy of the encoded form

getEncodedFormRaw

protected byte[] getEncodedFormRaw()
Get the encoded form of this transaction 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. Transaction 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

createTransactionID

public static TransactionID createTransactionID(byte[] encoded)
Create a transaction ID object for the given encoded representation.

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

writeReplace

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

Returns:
the serialized representation

JBoss EJB client 1.0.5.Final

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