public interface TransportLayer
extends java.lang.AutoCloseable
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the transport layer.
|
java.io.DataInputStream |
getInputStream()
Get the input stream of the layer.
|
java.io.DataOutputStream |
getOutputStream()
Get the output stream of the layer.
|
int |
getTimeout()
Get the response timeout in MILLIS.
|
boolean |
isClosed()
Check if the layer is open.
|
void |
open()
Opens the transport layer.
|
void |
setTimeout(int timeout)
Set the response timeout.
|
void open() throws java.io.IOException
java.io.IOException
- if an I/O error occurs while opening.void close()
close
in interface java.lang.AutoCloseable
java.io.DataOutputStream getOutputStream()
java.io.DataInputStream getInputStream()
boolean isClosed()
true
if the layer is closed.void setTimeout(int timeout) throws java.io.IOException
timeout
- the timeout in MILLIS.java.io.IOException
- if an I/O error occurs.int getTimeout() throws java.io.IOException
java.io.IOException
- if an I/O error occurs.