Constructor and Description |
---|
TCPChannel(java.lang.String host,
int port)
Instantiates a new instance of TCPChannel creating a tcp client.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the communication channel.
|
java.lang.String |
getID()
Returns the communication channel ID.
|
java.io.InputStream |
getInputStream() |
java.io.OutputStream |
getOutputStream() |
boolean |
isOpen()
Returns the open status of the communication channel.
|
void |
open(int timeout)
Opens the communication channel.
|
public TCPChannel(java.lang.String host, int port) throws ChannelException
host
- Host name.port
- Port No.ChannelException
- Thrown for any detected error.public java.io.InputStream getInputStream() throws java.io.IOException
getInputStream
in interface IChannel
java.io.IOException
public java.io.OutputStream getOutputStream() throws java.io.IOException
getOutputStream
in interface IChannel
java.io.IOException
public boolean isOpen()
IChannel
public void close() throws ChannelException
IChannel
close
in interface IChannel
ChannelException
- Thrown for any detected error.public java.lang.String getID()
IChannel
public void open(int timeout) throws ChannelException
IChannel
open
in interface IChannel
timeout
- Default Timeout (in ms) to be used for all
read actions.ChannelException
- Thrown for any detected error.