|
||||||||||
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..
Method Summary | |
---|---|
ResponseOutputStream |
createResponse(java.net.Socket socket)
This lets protocols encode a response stream. |
java.lang.Object |
read(java.io.InputStream is)
Reads the input stream and returns a whole message. |
void |
write(java.io.OutputStream os,
java.lang.Object data)
Write the specified message to the output stream. |
Method Detail |
---|
java.lang.Object read(java.io.InputStream is) throws java.io.IOException
is
- the input stream
java.io.IOException
- if an exception occursvoid write(java.io.OutputStream os, java.lang.Object data) throws java.io.IOException
os
- the output stream to write todata
- the data to write
java.io.IOException
- if an exception occursResponseOutputStream createResponse(java.net.Socket socket) throws java.io.IOException
socket
- The destination to write to
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |