|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface StreamParser
A generic handler which is used in NioServer, NioClient and BlockingClient to handle incoming
data streams.
| Method Summary | |
|---|---|
void |
connectionClosed()
Called when the connection socket is closed |
void |
connectionOpened()
Called when the connection socket is first opened |
int |
getMaxMessageSize()
Returns the maximum message size of a message on the socket. |
int |
receiveBytes(ByteBuffer buff)
Called when new bytes are available from the remote end. |
void |
setWriteTarget(MessageWriteTarget writeTarget)
Called when this parser is attached to an upstream write target (ie a low-level connection handler). |
| Method Detail |
|---|
void connectionClosed()
void connectionOpened()
int receiveBytes(ByteBuffer buff)
throws Exception
Called when new bytes are available from the remote end. This should only ever be called by the single writeTarget associated with any given StreamParser, multiple callers will likely confuse implementations.
Implementers/callers must follow the following conventions exactly:
Exceptionvoid setWriteTarget(MessageWriteTarget writeTarget)
int getMaxMessageSize()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||