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.
-
_baseTid
-
-
_claddress
-
-
_myHostname
-
-
_peerHostname
-
-
_secAttributes
-
-
_situationDescription
-
-
_state
-
-
_txq
-
-
CLASSNAME
-
-
INITIATOR
-
-
NO_ROLE
-
-
RESPONDER
-
-
TXBaseContext()
-
-
getBaseTransactionID()
-
-
getCLAddress()
-
-
getMyHostname()
-
-
getPeerHostname()
-
-
getSecAttributeSet()
-
-
getSituationDescription()
-
-
isAlive()
- Tests whether the connection is still open.
-
read()
- Reads an object from the channel.
-
read(CLAddress)
- Reads an object from the channel
This method blocks (naturally) until
an object could be read.
-
removeSECA(SituationDescription)
- Used to strip all SECA information from a SituationDescription.
-
write(Serializable)
- Writes the object to the channel.
-
write(Serializable, CLAddress)
- Writes the object to the channel.
CLASSNAME
protected static final String CLASSNAME
_myHostname
protected TXHostname _myHostname
_peerHostname
protected TXHostname _peerHostname
_claddress
protected CLAddress _claddress
_secAttributes
protected AttributeSet _secAttributes
_baseTid
protected TransactionID _baseTid
_situationDescription
protected SituationDescription _situationDescription
_txq
protected TXQueues _txq
NO_ROLE
protected static final int NO_ROLE
RESPONDER
protected static final int RESPONDER
INITIATOR
protected static final int INITIATOR
_state
protected int _state
TXBaseContext
public TXBaseContext()
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... .
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... .
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... .
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... .
getMyHostname
public TXHostname getMyHostname()
- Returns:
- My own hostname or IP number.
This might be null if the txcontext
is not already accepted/offered.
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.
getCLAddress
public CLAddress getCLAddress()
- Returns:
- The claddress used in the txcontext.
getSecAttributeSet
public AttributeSet getSecAttributeSet()
- Returns:
- The security attributes used in the txcontext.
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.
getBaseTransactionID
public TransactionID getBaseTransactionID()
- Returns:
- The base TransactionID used in the txcontext.
isAlive
public boolean isAlive()
- Tests whether the connection is still open.
- Returns:
- true When the connection is alive,
false otherwise.
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