public class StreamConnection extends AbstractConnection
AbstractConnection.State| Constructor and Description |
|---|
StreamConnection(java.io.InputStream in,
java.io.OutputStream out)
Create a StreamConnection.
|
| Modifier and Type | Method and Description |
|---|---|
static Pair<Connection,Connection> |
createConnectionPair()
Create and start a pair of connections that pipe input to each other.
|
boolean |
isAlive()
Find out if this connection is still alive.
|
protected void |
sendBytes(byte[] b)
Send some bytes to the other end of the connection.
|
protected void |
shutdownImpl()
Perform shutdown actions.
|
protected void |
startupImpl()
Perform startup actions.
|
addConnectionListener, bytesReceived, fireMessageReceived, getName, getRegistry, removeConnectionListener, sendMessage, sendMessages, setLogBytes, setName, setRegistry, shutdown, startup, toStringpublic StreamConnection(java.io.InputStream in,
java.io.OutputStream out)
in - The InputStream to read.out - The OutputStream to write to.protected void startupImpl()
AbstractConnectionstartupImpl in class AbstractConnectionpublic boolean isAlive()
ConnectionisAlive in interface ConnectionisAlive in class AbstractConnectionprotected void shutdownImpl()
AbstractConnectionshutdownImpl in class AbstractConnectionprotected void sendBytes(byte[] b)
throws java.io.IOException
AbstractConnectionsendBytes in class AbstractConnectionb - The bytes to send.java.io.IOException - If the data cannot be sent.public static Pair<Connection,Connection> createConnectionPair()