Class NoopExtensionFunction
- java.lang.Object
-
- io.undertow.websockets.extensions.NoopExtensionFunction
-
- All Implemented Interfaces:
ExtensionFunction
public class NoopExtensionFunction extends java.lang.Object implements ExtensionFunction
-
-
Field Summary
Fields Modifier and Type Field Description static ExtensionFunctionINSTANCE-
Fields inherited from interface io.undertow.websockets.extensions.ExtensionFunction
RSV1, RSV2, RSV3
-
-
Constructor Summary
Constructors Constructor Description NoopExtensionFunction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddispose()Dispose this function.booleanhasExtensionOpCode()Validate if current extension defines a new WebSocket Opcode.PooledByteBuffertransformForRead(PooledByteBuffer pooledBuffer, StreamSourceFrameChannel channel, boolean lastFragmentOfFrame)Transform the supplied buffer per this extension.PooledByteBuffertransformForWrite(PooledByteBuffer pooledBuffer, StreamSinkFrameChannel channel, boolean lastFrame)Transform the supplied buffer per this extension.intwriteRsv(int rsv)Add RSV bits (RSV1, RSV2, RSV3) to the current rsv status.
-
-
-
Field Detail
-
INSTANCE
public static final ExtensionFunction INSTANCE
-
-
Method Detail
-
hasExtensionOpCode
public boolean hasExtensionOpCode()
Description copied from interface:ExtensionFunctionValidate if current extension defines a new WebSocket Opcode.- Specified by:
hasExtensionOpCodein interfaceExtensionFunction- Returns:
trueif current extension defines specific Opcodefalseis current extension does not define specific Opcode- See Also:
- WebSocket Base Framing Protocol Reference
-
writeRsv
public int writeRsv(int rsv)
Description copied from interface:ExtensionFunctionAdd RSV bits (RSV1, RSV2, RSV3) to the current rsv status.- Specified by:
writeRsvin interfaceExtensionFunction- Parameters:
rsv- current RSV bits status- Returns:
- rsv status
-
transformForWrite
public PooledByteBuffer transformForWrite(PooledByteBuffer pooledBuffer, StreamSinkFrameChannel channel, boolean lastFrame) throws java.io.IOException
Description copied from interface:ExtensionFunctionTransform the supplied buffer per this extension. The buffer can be modified in place, or a new pooled buffer can be returned (in which case be sure to free the original buffer- Specified by:
transformForWritein interfaceExtensionFunction- Parameters:
pooledBuffer- Buffer to transformchannel- working channel- Returns:
- transformed buffer (may be the same one, just with modified contents)
- Throws:
java.io.IOException
-
transformForRead
public PooledByteBuffer transformForRead(PooledByteBuffer pooledBuffer, StreamSourceFrameChannel channel, boolean lastFragmentOfFrame) throws java.io.IOException
Description copied from interface:ExtensionFunctionTransform the supplied buffer per this extension. The buffer can be modified in place, or a new pooled buffer can be returned (in which case be sure to free the original buffer- Specified by:
transformForReadin interfaceExtensionFunction- Parameters:
pooledBuffer- Buffer to transformchannel- working channellastFragmentOfFrame- If this frame is the last fragment of a message. Note that this may not be received for every message, if the message ends with an empty frame- Returns:
- transformed buffer (may be the same one, just with modified contents)
- Throws:
java.io.IOException
-
dispose
public void dispose()
Description copied from interface:ExtensionFunctionDispose this function. Called upon connection closure- Specified by:
disposein interfaceExtensionFunction
-
-