|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectConnProcessor
A simple interface for an object that has the ability to be attached and/or detached from a stream or socket.
Constructor Summary | |
ConnProcessor()
|
Method Summary | |
void |
attachToInput(java.io.InputStream in)
Attaches this connection processor to the given input stream. |
void |
attachToOutput(java.io.OutputStream out)
Attaches this FLAP processor to the given output stream. |
void |
attachToSocket(java.net.Socket socket)
Attaches this connection processor to the given socket's input and output streams. |
void |
detach()
Detaches this connection processor from any attached input and/or output stream. |
protected java.io.InputStream |
getInputStream()
Returns the input stream to which this processor is currently attached, or null if none is currently set. |
protected java.io.OutputStream |
getOutputStream()
Returns the output stream to which this processor is currently attached, or null if none is currently set. |
protected boolean |
isAttached()
Returns whether this connection processor is currently attached to a stream (input, output, or both). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ConnProcessor()
Method Detail |
public final void attachToSocket(java.net.Socket socket) throws java.io.IOException
IOException
will probably be thrown).
socket
- the socket to attach to
java.io.IOException
- if an I/O error occurspublic final void attachToInput(java.io.InputStream in)
in
cannot be
null
; to detach from a stream, use detach()
.
in
- the input stream to attach topublic final void attachToOutput(java.io.OutputStream out)
send
method will be written. Note
that out
cannot be null
; to detach from a
stream, use detach()
.
out
- the output stream to attach toprotected final boolean isAttached()
protected final java.io.InputStream getInputStream()
null
if none is currently set.
protected final java.io.OutputStream getOutputStream()
null
if none is currently set.
public final void detach()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |