All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class semper.txlayer.transfer.TransferTransaction

java.lang.Object
   |
   +----semper.txlayer.transaction.Transaction
           |
           +----semper.txlayer.transfer.TransferTransaction

public abstract class TransferTransaction
extends Transaction
implements Serializable
This class is the baseclass for performing transfers between two semper applications. The class is intended to provide the infrastructure for performing a SEMPER-transfer protocol. This is done by subclasses which then implement a specific transfer protocol. This class itself does not define a transfer protocol; it is an abstract class. Specific protocolls are, e.g., VectorTransfer or PaymentTransfer.


Variable Index

 o _date
 o _description
The Description that will be parsed to Subtransactions.
 o _from
Contains infos about sender, receiver and date after the transfer.
 o _isSubTransfer
Are we a SubTransfer or are we at the top of the Transaction tree?
 o _offeredAttributes
The secAttributes that are to be applied to the transfer.
 o _requestedAttributes
 o _role
The role of the transfertransaction object.
 o _to
 o _transferScheduler
This holds the Scheduler that will monitor all TransferTransactions in a tree.
 o _txc
The TXSubContext that contains our communication means.
 o NO_ROLE
These constants define the roles
 o RECEIVER
 o SENDER

Constructor Index

 o TransferTransaction()
empty constructor.
 o TransferTransaction(TransactionID)

Method Index

 o getNRView()
This method is needed for supporting non repudiation.
 o getObject()
After the transaction was committed, this method returns the resulting = received Object.
 o getRole()
Tells if the transaction acts as a sender or as a receiver.
 o prepareReceiver(TXSubContext)
This method be called before a begin().
 o prepareReceiver(TXSubContext, AttributeSet, AttributeSet)
This method be called before a begin().
 o prepareReceiver(TXSubContext, AttributeSet, AttributeSet, Description)
This method be called before a begin().
 o prepareReceiver(TXSubContext, Description)
This method be called before a begin().
 o prepareSender(TXSubContext)
This method must be called before a begin().
 o prepareSender(TXSubContext, AttributeSet, AttributeSet)
This method must be called before a begin().
 o prepareSender(TXSubContext, AttributeSet, AttributeSet, Description)
This method be called before a begin().
 o prepareSender(TXSubContext, Description)
This method must be called before a begin().
 o prepareSubReceiver(TXSubContext, AttributeSet, AttributeSet, Description, TransferScheduler)
This is a TXLayer private method.
 o prepareSubSender(TXSubContext, AttributeSet, AttributeSet, Description, TransferScheduler)
This is a TXLayer private method.
 o read()
TransferTransaction read method.
 o receive()
This method is invoked when the preparation is done and the transaction shall begin.
 o run()
The Thread's run method.
 o send()
This method is invoked when the preparation is done and the transaction shall begin.
 o write(Serializable)
TransferTransactions write method.

Variables

 o NO_ROLE
 public static final int NO_ROLE
These constants define the roles

 o RECEIVER
 public static final int RECEIVER
 o SENDER
 public static final int SENDER
 o _role
 protected int _role
The role of the transfertransaction object.

 o _txc
 protected TXSubContext _txc
The TXSubContext that contains our communication means.

 o _offeredAttributes
 protected AttributeSet _offeredAttributes
The secAttributes that are to be applied to the transfer.

 o _requestedAttributes
 protected AttributeSet _requestedAttributes
 o _description
 protected Description _description
The Description that will be parsed to Subtransactions.

 o _isSubTransfer
 protected boolean _isSubTransfer
Are we a SubTransfer or are we at the top of the Transaction tree?

 o _transferScheduler
 protected TransferScheduler _transferScheduler
This holds the Scheduler that will monitor all TransferTransactions in a tree. Not actively used up to now.

 o _from
 protected String _from
Contains infos about sender, receiver and date after the transfer. Intended for inclusion into an NRView.

 o _to
 protected String _to
 o _date
 protected Date _date

Constructors

 o TransferTransaction
 public TransferTransaction()
empty constructor.

 o TransferTransaction
 public TransferTransaction(TransactionID tid)

Methods

 o getNRView
 public abstract NRView getNRView()
This method is needed for supporting non repudiation.

Returns:
The NRView returned must be a presentation of the data items and the transfer protocol parameters that are needed for building a real non repudiation prrof.
 o run
 public void run()
The Thread's run method. DON'T CALL this method from outside.

Overrides:
run in class Transaction
 o prepareSender
 public void prepareSender(TXSubContext txc)
This method must be called before a begin(). It is a hook to do some pre-stuff for the sender of a transferable object.

Parameters:
txc - The TXSubContext to send the stuff to... . Please don't use subcontext 99990 to 99999 as they are reserved for internal use.
 o prepareSender
 public void prepareSender(TXSubContext txc,
                           Description descr)
This method must be called before a begin(). It is a hook to do some pre-stuff for the sender of a transferable object.

Parameters:
txc - The TXSubContext to send the stuff to... . Please don't use subcontext 99990 to 99999 as they are reserved for internal use.
descr - The Description of the transfered objects. Currently ignored.
 o prepareSender
 public void prepareSender(TXSubContext txc,
                           AttributeSet offeredAttributes,
                           AttributeSet requestedAttributes)
This method must be called before a begin(). It is a hook to do some pre-stuff for the sender of a transferable object.

Parameters:
txc - The TXSubContext to send the stuff to... . Please don't use subcontext 99990 to 99999 as they are reserved for internal use.
offeredAttributes - The security attributes that are offered to the peer in the transfer.
requestedAttributes - The security attributes that are requested from the peer.
 o prepareSender
 public void prepareSender(TXSubContext txc,
                           AttributeSet offeredAttributes,
                           AttributeSet requestedAttributes,
                           Description descr)
This method be called before a begin(). It is a hook to do some pre-stuff for the sender of a transferable object.

Parameters:
txc - The TXSubContext to send the stuff to... . Please don't use subcontext 99990 to 99999 as they are reserved for internal use.
offeredAttributes - The security attributes that are offered to the peer in the transfer.
requestedAttributes - The security attributes that are requested from the peer.
descr - The Description of the transfered objects. Currently ignored.
 o prepareSubSender
 public void prepareSubSender(TXSubContext txc,
                              AttributeSet offeredAttributes,
                              AttributeSet requestedAttributes,
                              Description descr,
                              TransferScheduler transferScheduler)
This is a TXLayer private method. It is to be called before a begin(). It is a hook to do some pre-stuff for the sender of a transferable object and is only to be used with Subtransfers in a tree of TransferTransactions.

Parameters:
txc - The TXSubContext to send the stuff to... . Please don't use subcontext 99990 to 99999 as they are reserved for internal use.
offeredAttributes - The security attributes that are offered to the peer in the transfer.
requestedAttributes - The security attributes that are requested from the peer.
descr - The Description of the transfered objects. Currently ignored.
transferScheduler - An instantiated scheduler that monitors all TransferTransactions in a tree. Not used up to now.
 o prepareReceiver
 public void prepareReceiver(TXSubContext txc)
This method be called before a begin(). It is a hook to do some pre-stuff for the receiver of a transferable object.

Parameters:
txc - The TXSubContext to send the stuff to... . Please don't use subcontext 99990 to 99999 as they are reserved for internal use.
 o prepareReceiver
 public void prepareReceiver(TXSubContext txc,
                             Description descr)
This method be called before a begin(). It is a hook to do some pre-stuff for the receiver of a transferable object.

Parameters:
txc - The TXSubContext to send the stuff to... . Please don't use subcontext 99990 to 99999 as they are reserved for internal use.
descr - The Description of the transfered objects. Currently ignored.
 o prepareReceiver
 public void prepareReceiver(TXSubContext txc,
                             AttributeSet offeredAttributes,
                             AttributeSet requestedAttributes)
This method be called before a begin(). It is a hook to do some pre-stuff for the receiver of a transferable object.

Parameters:
txc - The TXSubContext to send the stuff to... . Please don't use subcontext 99990 to 99999 as they are reserved for internal use.
offeredAttributes - The security attributes that are offered to the peer in the transfer.
requestedAttributes - The security attributes that are requested from the peer.
 o prepareReceiver
 public void prepareReceiver(TXSubContext txc,
                             AttributeSet offeredAttributes,
                             AttributeSet requestedAttributes,
                             Description descr)
This method be called before a begin(). It is a hook to do some pre-stuff for the receiver of a transferable object.

Parameters:
txc - The TXSubContext to send the stuff to... . Please don't use subcontext 99990 to 99999 as they are reserved for internal use.
offeredAttributes - The security attributes that are offered to the peer in the transfer.
requestedAttributes - The security attributes that are requested from the peer.
descr - The Description of the transfered objects. Currently ignored.
 o prepareSubReceiver
 public void prepareSubReceiver(TXSubContext txc,
                                AttributeSet offeredAttributes,
                                AttributeSet requestedAttributes,
                                Description descr,
                                TransferScheduler transferScheduler)
This is a TXLayer private method. It is to be called before a begin(). It is a hook to do some pre-stuff for the receiver of a transferable object and is only to be used with Subtransfers in a tree of TransferTransactions.

Parameters:
txc - The TXSubContext to send the stuff to... .
offeredAttributes - The security attributes that are offered to the peer in the transfer.
requestedAttributes - The security attributes that are requested from the peer.
descr - The Description of the transfered objects. Currently ignored.
transferScheduler - An instantiated scheduler that monitors all TransferTransactions in a tree. Not used up to now.
 o getObject
 public abstract Object getObject()
After the transaction was committed, this method returns the resulting = received Object. Here, this method is abstract.

Returns:
The received object.
 o getRole
 public int getRole()
Tells if the transaction acts as a sender or as a receiver. see also the constants TransferTransaction.NO_ROLE, TransferTransaction.SENDER, TransferTransaction.RECEIVER.

 o send
 protected abstract void send() throws TXLayerException
This method is invoked when the preparation is done and the transaction shall begin. This is the point to enter the code for the special protocol, the sender's part.

Throws: TXLayerException
When problems occur.
 o receive
 protected abstract void receive() throws TXLayerException
This method is invoked when the preparation is done and the transaction shall begin. This is the point to enter the code for the special protocol, the receiver's part.

Throws: TXLayerException
When problems occur.
 o write
 protected void write(Serializable s) throws TXContextCommException
TransferTransactions write method. Can be used in derived transfertransactions.

Parameters:
s - The object to be written.
Throws: TXContextCommException
When comm problems occur.
 o read
 protected Serializable read() throws TXContextCommException
TransferTransaction read method. Can be used in derived transfertransaction.

Returns:
The read object.
Throws: TXContextCommException
When comm problems occur.

All Packages  Class Hierarchy  This Package  Previous  Next  Index