All Packages Class Hierarchy This Package Previous Next Index
Class semper.txlayer.exchange.ExchangeTransaction
java.lang.Object
|
+----semper.txlayer.transaction.Transaction
|
+----semper.txlayer.exchange.ExchangeTransaction
- public class ExchangeTransaction
- extends Transaction
- implements Serializable
this is the baseclass for performing exchanges. The exchange
is done as a sequence of TransferTransaction.
-
_cont
-
-
_expectation
-
-
_offeredAttributes
-
-
_received_cont
-
-
_requestedAttributes
-
-
_role
-
-
_txc
-
-
NO_ROLE
- Thee constants define the roles.
-
ORIGINATOR
-
-
RESPONDER
-
-
ExchangeTransaction()
- Empty Constructor.
-
ExchangeTransaction(Container)
- Create an ExchangeTransaction from a Container.
-
ExchangeTransaction(TransactionID)
-
-
getObject()
- This method gives the Object that was received
in the exchange.
-
prepareOriginator(TXSubContext, AttributeSet, AttributeSet, Description)
- This method must be called before a begin().
-
prepareOriginator(TXSubContext, Description)
- This method must be called before a begin().
-
prepareResponder(TXSubContext, AttributeSet, AttributeSet, Description)
- This method must be called before a begin().
-
prepareResponder(TXSubContext, Description)
- This method must be called before a begin().
-
run()
- This is the method we have to implement because
we extend from Transaction.
NO_ROLE
public static final int NO_ROLE
- Thee constants define the roles.
ORIGINATOR
public static final int ORIGINATOR
RESPONDER
public static final int RESPONDER
_cont
protected Container _cont
_received_cont
protected Container _received_cont
_role
protected int _role
_expectation
protected Description _expectation
_txc
protected TXSubContext _txc
_offeredAttributes
protected AttributeSet _offeredAttributes
_requestedAttributes
protected AttributeSet _requestedAttributes
ExchangeTransaction
public ExchangeTransaction()
- Empty Constructor. Can be used.
ExchangeTransaction
public ExchangeTransaction(TransactionID tid)
- Parameters:
- tid - The TransactionID the ExchangeTransaction
should have.
ExchangeTransaction
public ExchangeTransaction(Container c)
- Create an ExchangeTransaction from a Container.
- Parameters:
- c - The Container.
run
public void run()
- This is the method we have to implement because
we extend from Transaction. The exchange takes place here.
- Overrides:
- run in class Transaction
prepareOriginator
public void prepareOriginator(TXSubContext txc,
Description expectation)
- This method must be called before a begin().
Necessary to prepare one side as Originator.
- Parameters:
- txc - The context that contains means for communication.
- expectation - The description of the goods we want
to receive.
prepareOriginator
public void prepareOriginator(TXSubContext txc,
AttributeSet offeredAttributes,
AttributeSet requestedAttributes,
Description expectation)
- This method must be called before a begin().
Necessary to prepare one side as Originator.
- Parameters:
- txc - The context that contains means for communication.
- secAttributes - The security attributes that are to be
applied to each transfer.
- expectation - The description of the goods we want
to receive.
prepareResponder
public void prepareResponder(TXSubContext txc,
Description expectation)
- This method must be called before a begin().
It is necessary to prepare one side as Responder.
- Parameters:
- txc - The context that contains means for communication.
- expectation - The description of the goods we want
to receive.
prepareResponder
public void prepareResponder(TXSubContext txc,
AttributeSet offeredAttributes,
AttributeSet requestedAttributes,
Description expectation)
- This method must be called before a begin().
It is necessary to prepare one side as Responder.
- Parameters:
- txc - The context that contains means for communication.
- secAttributes - The security attributes that are to be
applied to each transfer.
- expectation - The description of the goods we want
to receive.
getObject
public Object getObject()
- This method gives the Object that was received
in the exchange.
- Returns:
- The received object.
All Packages Class Hierarchy This Package Previous Next Index