All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class semper.txlayer.context.TXBaseContext

java.lang.Object
   |
   +----semper.txlayer.context.TXBaseContext

public abstract class TXBaseContext
extends Object
The basis for TXContext and TXSubContext. Does communication with TXQueues.


Variable Index

 o _baseTid
 o _claddress
 o _myHostname
 o _peerHostname
 o _secAttributes
 o _situationDescription
 o _state
 o _txq
 o CLASSNAME
 o INITIATOR
 o NO_ROLE
 o RESPONDER

Constructor Index

 o TXBaseContext()

Method Index

 o getBaseTransactionID()
 o getCLAddress()
 o getMyHostname()
 o getPeerHostname()
 o getSecAttributeSet()
 o getSituationDescription()
 o isAlive()
Tests whether the connection is still open.
 o read()
Reads an object from the channel.
 o read(CLAddress)
Reads an object from the channel This method blocks (naturally) until an object could be read.
 o removeSECA(SituationDescription)
Used to strip all SECA information from a SituationDescription.
 o write(Serializable)
Writes the object to the channel.
 o write(Serializable, CLAddress)
Writes the object to the channel.

Variables

 o CLASSNAME
 protected static final String CLASSNAME
 o _myHostname
 protected TXHostname _myHostname
 o _peerHostname
 protected TXHostname _peerHostname
 o _claddress
 protected CLAddress _claddress
 o _secAttributes
 protected AttributeSet _secAttributes
 o _baseTid
 protected TransactionID _baseTid
 o _situationDescription
 protected SituationDescription _situationDescription
 o _txq
 protected TXQueues _txq
 o NO_ROLE
 protected static final int NO_ROLE
 o RESPONDER
 protected static final int RESPONDER
 o INITIATOR
 protected static final int INITIATOR
 o _state
 protected int _state

Constructors

 o TXBaseContext
 public TXBaseContext()

Methods

 o write
 public void write(Serializable m) throws TXContextCommException
Writes the object to the channel. The internally stored claddress is used.

Parameters:
m - The serializable object to write
Throws: TXContextCommException
When the Channel does not want to write our object... .
 o write
 public void write(Serializable m,
                   CLAddress claddress) throws TXContextCommException
Writes the object to the channel.

Parameters:
m - The serializable object to write
claddress - Serves as a channel correlator to allow multiplexing. Be carefull to use exactly the same claddress as the reading partner, otherwise the reader will not get anything.
Throws: TXContextCommException
When the Channel does not want to write our object... .
 o read
 public Serializable read() throws TXContextCommException
Reads an object from the channel. The internally stored claddress is used.

Returns:
The read object
Throws: TXContextCommException
When the Channel does not want to read an object... .
 o read
 public Serializable read(CLAddress claddress) throws TXContextCommException
Reads an object from the channel This method blocks (naturally) until an object could be read.

Parameters:
claddress - Serves as a channel correlator to allow multiplexing. Be carefull to use exactly the same claddress as the write partner, otherwise you will not get anything.
Returns:
The read object
Throws: TXContextCommException
When the Channel does not want to read an object... .
 o getMyHostname
 public TXHostname getMyHostname()
Returns:
My own hostname or IP number. This might be null if the txcontext is not already accepted/offered.
 o getPeerHostname
 public TXHostname getPeerHostname()
Returns:
The hostname or IP number of the peer. This might be null if the txcontext is not already accepted/offered.
 o getCLAddress
 public CLAddress getCLAddress()
Returns:
The claddress used in the txcontext.
 o getSecAttributeSet
 public AttributeSet getSecAttributeSet()
Returns:
The security attributes used in the txcontext.
 o getSituationDescription
 public SituationDescription getSituationDescription()
Returns:
The actually used SituationDescription. The own username, the name of the peer and the name of the BA that called us thru the CL may be retrieved from here. However, some of these values may be null.
 o getBaseTransactionID
 public TransactionID getBaseTransactionID()
Returns:
The base TransactionID used in the txcontext.
 o isAlive
 public boolean isAlive()
Tests whether the connection is still open.

Returns:
true When the connection is alive, false otherwise.
 o removeSECA
 protected SituationDescription removeSECA(SituationDescription s1)
Used to strip all SECA information from a SituationDescription. When you pass a SituationDescription to seccomm, you will not want to use certificates with SECA, so you have to remove all references to it.


All Packages  Class Hierarchy  This Package  Previous  Next  Index