lime
Class TransactionOpDescriptor

java.lang.Object
  extended bylime.OpDescriptor
      extended bylime.RemoteOpDescriptor
          extended bylime.TransactionOpDescriptor
All Implemented Interfaces:
java.io.Serializable

class TransactionOpDescriptor
extends RemoteOpDescriptor

The transactionOpDescriptor is used within the TransactionMgr to maintain information about the state of the transaction.

Version:
2.0
Author:
Chien-Liang Fok

Field Summary
(package private)  AgentID agent
          Null if host level transaction, else initiating agent
(package private)  LimeServerID dest
          Where the message is destined.
private  EngagementMsg em
          Data for an engagement
(package private)  boolean isGroupCast
          Is this message a group cast?
(package private)  AgentID opDestAgent
          The destination agent (or null if host).
(package private)  AgentID opSourceAgent
          The source agent (or null if host).
(package private)  LimeServerID sender
          This is the host from which data is being sent from.
(package private)  LimeServerID source
          The ID of the LimeServer on which this descriptor was created.
(package private)  TransactionID tid
          The unique ID of the transaction.
(package private)  short transType
          The type of the transaction
(package private)  short type
          The type of the operation.
 
Constructor Summary
(package private) TransactionOpDescriptor(short type, short transType, TransactionID tid, AgentID agent, EngagementMsg em)
          Creates a TransactionOpDescriptor.
(package private) TransactionOpDescriptor(short type, short transType, TransactionID tid, LimeServerID source, LimeServerID sender, AgentID agent, EngagementMsg em)
          Creates a with the specified source and sender.
 
Method Summary
 EngagementMsg getEngagementMessage()
          Returns the engagement message.
 void setEngagementMessage(EngagementMsg em)
          Sets the engagement message within this class.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

transType

short transType
The type of the transaction


sender

LimeServerID sender
This is the host from which data is being sent from.


agent

AgentID agent
Null if host level transaction, else initiating agent


em

private EngagementMsg em
Data for an engagement


tid

TransactionID tid
The unique ID of the transaction.


source

LimeServerID source
The ID of the LimeServer on which this descriptor was created. It is automatically initialized by the constructor.


dest

transient LimeServerID dest
Where the message is destined.


opSourceAgent

transient AgentID opSourceAgent
The source agent (or null if host).


opDestAgent

transient AgentID opDestAgent
The destination agent (or null if host).


isGroupCast

transient boolean isGroupCast
Is this message a group cast?


type

short type
The type of the operation.

Constructor Detail

TransactionOpDescriptor

TransactionOpDescriptor(short type,
                        short transType,
                        TransactionID tid,
                        LimeServerID source,
                        LimeServerID sender,
                        AgentID agent,
                        EngagementMsg em)
Creates a with the specified source and sender.

Parameters:
type - the type of the specific transaction, possible values include INITIATOR_REQ, SETUP, SETUP_SPECIAL, DATA, START, READY_SPECIAL, READY, REQUEST_TRANSACTION, TRANSACTION_GRANTED.
transType - this is the type of the overall transaction. possible values include AGENT_HELLO, AGENT_BYE, HOST_HELLO, HOST_BYE.
tid - the TransactionID of the transaction this descriptor is a part of.
source - the LimeServerID of the host that created this transaction.
agent - the agents involved in the transaction.
em - The engagment manager.

TransactionOpDescriptor

TransactionOpDescriptor(short type,
                        short transType,
                        TransactionID tid,
                        AgentID agent,
                        EngagementMsg em)
Creates a TransactionOpDescriptor.

Parameters:
type - the type of the specific transaction, possible values include INITIATOR_REQ, SETUP, SETUP_SPECIAL, DATA, START, READY_SPECIAL, READY, REQUEST_TRANSACTION, TRANSACTION_GRANTED.
transType - this is the type of the overall transaction. possible values include AGENT_HELLO, AGENT_BYE, HOST_HELLO, HOST_BYE.
tid - the TransactionID of the transaction this descriptor is a part of.
agent - the agents involved in the transaction.
em - The engagment manager.
Method Detail

setEngagementMessage

public void setEngagementMessage(EngagementMsg em)
Sets the engagement message within this class.

Parameters:
em - the engagement message that this clas will hold.

getEngagementMessage

public EngagementMsg getEngagementMessage()
Returns the engagement message. Within this transaction Op Descriptor.

Returns:
the engagement message

toString

public java.lang.String toString()