|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.exolab.core.messenger.StreamMultiplexer
This class implements a multiplexer that streams packets from a
PacketConnection's outbound queue to an OutputStream.
It is intended to run in a separate thread, terminating if one of the following conditions occur:
close() is invokedPacketQueue closes
PacketConnection,
Multiplexer| Constructor Summary | |
StreamMultiplexer(ManagedPacketConnection connection,
java.io.OutputStream stream)
Construct a new multiplexer |
|
| Method Summary | |
void |
close()
Close the multiplexer, freeing any allocated resources. |
protected void |
multiplex()
Stream packets from the connection's output queue to its output stream. |
void |
start()
Start multiplexing. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public StreamMultiplexer(ManagedPacketConnection connection,
java.io.OutputStream stream)
connection - the connection to read packets fromstream - the stream to write packets to
java.lang.IllegalArgumentException - if connection or stream is null| Method Detail |
public void start()
PacketConnection
instance, and sends them down the connection's physical connection
implementation.
start in interface Multiplexerjava.lang.IllegalStateException - if the multiplexer is running, or has
been closedpublic void close()
close in interface Multiplexerprotected void multiplex()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||