com.sun.enterprise.web.connector.grizzly.standalone
Class StaticStreamAlgorithm
java.lang.Object
com.sun.enterprise.web.connector.grizzly.algorithms.StreamAlgorithmBase
com.sun.enterprise.web.connector.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.enterprise.web.connector.grizzly.algorithms.StreamAlgorithmBase |
contentLength, curLimit, curPosition, embeddedInGlassFish, handler, headerLength, lastStatePosition, primaryByteBuffer, socketChannel, state, useByteBufferView, useDirectByteBuffer |
|
Method Summary |
Handler |
getHandler()
Return the Handler used by this algorithm. |
boolean |
parse(ByteBuffer byteBuffer)
Do not parse the bytes and automatically flip the ByteBuffer |
ByteBuffer |
preParse(ByteBuffer byteBuffer)
Do nothing, as the ByteBufferInputStream will take care of reading the
missing bytes. |
void |
recycle()
Recycle this object. |
| 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
- Returns:
- true if the algorithm determines the process can continue.
getHandler
public Handler getHandler()
- Return the
Handler used by this algorithm.
recycle
public void recycle()
- Recycle this object.
- Specified by:
recycle in interface StreamAlgorithm- Overrides:
recycle in class StreamAlgorithmBase
Copyright © 2005-2015 Oracle Corporation. All Rights Reserved.