public interface Connector
extends java.io.Closeable
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the connection.
|
java.lang.String[] |
connections()
Gets a list of all known active connections
|
java.io.InputStream |
getInputStream()
Get the input stream to read data over.
|
java.lang.String |
getName()
Get a string representation of the connection.
|
java.io.OutputStream |
getOutputStream()
Get the output stream to write data to.
|
boolean |
isReliable()
Check if a connection is relaible.
|
void |
setConnectionListener(ConnectionListener listener)
Set a connection state listener.
|
boolean |
waitOutputCompletion(long timeout)
Wait until the output buffer is empty.
|
java.lang.String getName()
java.io.InputStream getInputStream()
java.io.OutputStream getOutputStream()
boolean isReliable()
boolean waitOutputCompletion(long timeout)
timeout - timeout in milliseconds.void setConnectionListener(ConnectionListener listener)
listener - listener to call for connection/disconnection,
or null to disable listener.java.lang.String[] connections()
void close()
close in interface java.lang.AutoCloseableclose in interface java.io.Closeable