|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TcpProtocol
The TcpProtocol interface enables to plug different application level protocols on
a TcpConnector. Note that this interface has lost the direct byte array write method.
Standard callers should (and will, since it matches the same signature, which is why
the method has not been deprecated) use the generic method instead. For more complex use,
the method remains as an implementation detail in
ByteProtocol.writeByteArray(java.io.OutputStream, byte[])
.
Method Summary | |
---|---|
Object |
read(InputStream is)
Reads the input stream and returns a whole message. |
void |
write(OutputStream os,
Object data)
Write the specified message to the output stream. |
Method Detail |
---|
Object read(InputStream is) throws IOException
is
- the input stream
IOException
- if an exception occursvoid write(OutputStream os, Object data) throws IOException
os
- the output stream to write todata
- the data to write
IOException
- if an exception occurs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |