All Packages Class Hierarchy This Package Previous Next Index
Class semper.txlayer.context.TXQueues
java.lang.Object
|
+----java.lang.Thread
|
+----semper.txlayer.context.TXQueues
- public class TXQueues
- extends Thread
Objects of this class provide the following functionality:
- Multiplex/demultiplex several virtual connections over two
real SecComPoints.
- Supply read buffers.
TXQueues are used internally by TXContexts and TXSubContexts.
-
_failed
- On certain conditions this variable signals
that reading or writing failed.
-
TXQueues(SecComPoint, SecComPoint)
- Create a Queue
-
getMyCertificateContext()
-
-
getPeerCertificateContext()
-
-
read(CLAddress)
- Reads an object from the channel
-
run()
- This method constantly reads from the compoint and stores read
objects in the Vectors in the hashtable.
-
write(Serializable, CLAddress)
- Writes the object to the channel.
_failed
public boolean _failed
- On certain conditions this variable signals
that reading or writing failed. The Thread is
the stopped, no further operation is possible.
TXQueues
public TXQueues(SecComPoint cp_write,
SecComPoint cp_read)
- Create a Queue
write
public void write(Serializable m,
CLAddress claddress) throws TXContextCommException
- Writes the object to the channel.
- Parameters:
- m - The serializable object to write
- claddress - The claddress that servers as an channel identifier.
The peer must read for the same claddress.
- Throws: TXContextCommException
- When the Channel does not want to
write our object... .
read
public Serializable read(CLAddress claddress) throws TXContextCommException
- Reads an object from the channel
- Returns:
- The read object or null if there is
no object for us in the queues. Callers must
do a wait if they see a null.
- Throws: TXContextCommException
- When the Channel does not want to
read an object.
run
public void run()
- This method constantly reads from the compoint and stores read
objects in the Vectors in the hashtable. After a successful
read all waiting objects are notified.
- Overrides:
- run in class Thread
getMyCertificateContext
public CertificateContext getMyCertificateContext()
- Returns:
- A clone of my own certificates that are used
in the connection. Might be null if no connection
is established.
getPeerCertificateContext
public CertificateContext getPeerCertificateContext()
- Returns:
- A clone of the peers certificates that are used
in the connection. Might be null if no connection
is established.
All Packages Class Hierarchy This Package Previous Next Index