|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface StreamAlgorithm
Generic parsing interface that can be used to implement protocol specific logic parsing.
Method Summary | |
---|---|
ByteBuffer |
allocate(boolean useDirect,
boolean useView,
int size)
Deprecated. Allocate a ByteBuffer |
int |
contentLength()
Deprecated. Return the stream content-length. |
Interceptor |
getHandler()
Deprecated. The Interceptor associated with this algorithm. |
int |
getPort()
Deprecated. Return the port |
int |
headerLength()
Deprecated. Return the stream header length. |
boolean |
parse(ByteBuffer byteBuffer)
Deprecated. Parse the ByteBuffer and try to determine if the bytes
stream has been fully read from the SocketChannel . |
ByteBuffer |
postParse(ByteBuffer byteBuffer)
Deprecated. After parsing the bytes, post process the ByteBuffer |
ByteBuffer |
preParse(ByteBuffer byteBuffer)
Deprecated. Before parsing the bytes, initialize and prepare the algorithm. |
void |
recycle()
Deprecated. Recycle the algorithm. |
ByteBuffer |
rollbackParseState(ByteBuffer byteBuffer)
Deprecated. Rollback the ByteBuffer to its previous state in case
an error as occured. |
void |
setPort(int port)
Deprecated. Set the port this algorithm is used. |
void |
setSocketChannel(SocketChannel socketChannel)
Deprecated. Set the SocketChannel used by this algorithm |
Method Detail |
---|
int contentLength()
int headerLength()
ByteBuffer allocate(boolean useDirect, boolean useView, int size)
ByteBuffer
useDirect
- allocate a direct ByteBuffer
.useView
- allocate a view ByteBuffer
.size
- the size of the newly created ByteBuffer
.
ByteBuffer
ByteBuffer preParse(ByteBuffer byteBuffer)
byteBuffer
- the ByteBuffer
used by this algorithm
ByteBuffer
used by this algorithmboolean parse(ByteBuffer byteBuffer)
ByteBuffer
and try to determine if the bytes
stream has been fully read from the SocketChannel
.
byteBuffer
- the bytes read.
ByteBuffer postParse(ByteBuffer byteBuffer)
ByteBuffer
byteBuffer
- the ByteBuffer
used by this algorithm
ByteBuffer
used by this algorithmvoid recycle()
ByteBuffer rollbackParseState(ByteBuffer byteBuffer)
ByteBuffer
to its previous state in case
an error as occured.
byteBuffer
-
ByteBuffer
Interceptor getHandler()
Interceptor
associated with this algorithm.
Interceptor
void setSocketChannel(SocketChannel socketChannel)
SocketChannel
used by this algorithm
socketChannel
- set SocketChannel
void setPort(int port)
port
this algorithm is used.
port
- port numberint getPort()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |