All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class semper.txlayer.transfer.NRTransfer

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

public class NRTransfer
extends TransferTransaction
This special TransferTransaction is used to either generate an NRToken and send it to a peer or to receive such a token. The idea is as follows:
When a TransferTransaction is tagged with a Nonrepudiation Attribute, a NonRepudiationTransferAttribute and an NRObserver is instantiated. The NRTA creates a NRTransfer. The NRObserver registers itself with the TransferTransaction, and gets a reference to the NRTransfer. When the TransferTransaction is finished, the NRObserver is called, and starts all NRTransfers that it knows of. The NRTransfer collects the NRViews from the TransferTransaction in a NRWrapper, signs the NRWrapper and puts the signed NRWrapper into a NRToken. Then the NRToken is transferred to the peer.
The receiver of a proof also tagged the TransferTransaction with a Nonrepudiation Attribute. A NonRepudiationTransferAttribute and a NRObserver is instantiated. The NRTA creates a NRTransfer. The NRObserver registers itself with the TransferTransaction, and gets a reference to the NRTransfer. When the TransferTransaction is finished, the NRObserver is called, and starts all NRTransfers that it knows of. The NRTransfer then receives the NRToken from the peer, checks it for correctness, puts it into the NonRepudiation Attribute of the receiver, who can retrieve it from the attribute.
User configurable option: When the line

#semper.txlayer.askBeforeSign 1

is present in the _sempconfig, the user is prompted whether he really wants to sign the NRToken.

See Also:
NRToken, NRWrapper, NRObserver, NonRepudiationTransferAtrribute

Variable Index

 o NRO
 o NRR

Constructor Index

 o NRTransfer(TransferTransaction, NonRepudiation, String)
Constructor

Method Index

 o getNRView()
We must implement this because we are a TransferTransaction.
 o getObject()
 o receive()
This method receives an NRToken from the peer.
 o send()
This method creates the NRToken and sends it to the peer.

Variables

 o NRR
 public static final String NRR
 o NRO
 public static final String NRO

Constructors

 o NRTransfer
 public NRTransfer(TransferTransaction tta,
                   NonRepudiation nr,
                   String nrrornro)
Constructor

Parameters:
tta - The TransferTransaction for which an nrtoken is to be generated.
nr - The attribute where the generated NRToken is to be stored into.
nrrornro - Either NRTransfer.NRR or NRTransfer.NRO, stating whether this NRTransfer generates an nrr or nro receipt. This parameter does not influence the operation of the nrtransfer, but is provided so it can be included into the nrtoken for informational purposes.

Methods

 o send
 protected void send() throws TXContextCommException
This method creates the NRToken and sends it to the peer. It is called by the inherited run() method of TransferTransaction

Throws: TXContextCommException
When comm problems occur.
Overrides:
send in class TransferTransaction
 o receive
 protected void receive() throws TXContextCommException
This method receives an NRToken from the peer. The NRToken is put into the NonRepudiation attribute we got from our creator. It is called by the inherited run() method of TransferTransaction

Throws: TXContextCommException
When comm problems occur.
Overrides:
receive in class TransferTransaction
 o getNRView
 public NRView getNRView()
We must implement this because we are a TransferTransaction.

Returns:
The NRView of the contained TransferTransaction.
Overrides:
getNRView in class TransferTransaction
 o getObject
 public Object getObject()
Returns:
The contained NonRepudiation attribute. After the NRTransfer has ended this may contain an NRToken.
Overrides:
getObject in class TransferTransaction

All Packages  Class Hierarchy  This Package  Previous  Next  Index