public class IPStreamConnector extends java.lang.Object implements IStreamConnector
Constructor and Description |
---|
IPStreamConnector(IIPPlugin plugin,
java.net.Socket socket)
Creates a new stream connector that uses the specified
socket to communicate and adds the new stream connector
to the connector list.
|
Modifier and Type | Method and Description |
---|---|
java.io.InputStream |
getInputStream()
Returns the input stream of the socket.
|
java.io.OutputStream |
getOutputStream()
Returns the output stream of the socket.
|
IPlugin |
getPlugin()
Returns a reference to the underlying plug-in.
|
void |
release()
Closes the socket bound to the connector, thereby canceling the
input and output streams.
|
public IPStreamConnector(IIPPlugin plugin, java.net.Socket socket)
socket
- The socket of the connector.plugin
- The responsible plug-in.public java.io.InputStream getInputStream() throws java.io.IOException
getInputStream
in interface IStreamConnector
java.io.IOException
- Thrown if the stream cannot be opened.public java.io.OutputStream getOutputStream() throws java.io.IOException
getOutputStream
in interface IStreamConnector
java.io.IOException
- Thrown if the stream cannot be opened.public void release()
release
in interface IConnector
public IPlugin getPlugin()
getPlugin
in interface IConnector