com.sun.grizzly.standalone
Class StaticStreamAlgorithm
java.lang.Object
com.sun.grizzly.http.algorithms.StreamAlgorithmBase
com.sun.grizzly.standalone.StaticStreamAlgorithm
- All Implemented Interfaces:
- StreamAlgorithm
public class StaticStreamAlgorithm
- extends StreamAlgorithmBase
This algorithm doesn't parse the bytes, delegating the work to the
InternalInputBuffer.
- Author:
- Jeanfrancois Arcand
Fields inherited from class com.sun.grizzly.http.algorithms.StreamAlgorithmBase |
contentLength, curLimit, curPosition, handler, headerLength, lastStatePosition, primaryByteBuffer, socketChannel, state, useByteBufferView, useDirectByteBuffer |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StaticStreamAlgorithm
public StaticStreamAlgorithm()
preParse
public ByteBuffer preParse(ByteBuffer byteBuffer)
- Do nothing, as the ByteBufferInputStream will take care of reading the
missing bytes.
- Specified by:
preParse
in interface StreamAlgorithm
- Overrides:
preParse
in class StreamAlgorithmBase
- Parameters:
byteBuffer
- the ByteBuffer
used by this algorithm
- Returns:
ByteBuffer
used by this algorithm
parse
public boolean parse(ByteBuffer byteBuffer)
- Do not parse the bytes and automatically flip the
ByteBuffer
- Specified by:
parse
in interface StreamAlgorithm
- Specified by:
parse
in class StreamAlgorithmBase
- Parameters:
byteBuffer
- the bytes read.
- Returns:
- true if the algorithm determines the process can continue.
getHandler
public Interceptor getHandler()
- Return the
Interceptor
used by this algorithm.
- Returns:
Interceptor
recycle
public void recycle()
- Recycle this object.
- Specified by:
recycle
in interface StreamAlgorithm
- Overrides:
recycle
in class StreamAlgorithmBase
Copyright © 2009 SUN Microsystems. All Rights Reserved.