public class NoopExtensionFunction extends Object implements ExtensionFunction
Modifier and Type | Field and Description |
---|---|
static ExtensionFunction | INSTANCE |
RSV1, RSV2, RSV3
Constructor and Description |
---|
NoopExtensionFunction() |
Modifier and Type | Method and Description |
---|---|
void | dispose() Dispose this function. |
boolean | hasExtensionOpCode() Validate if current extension defines a new WebSocket Opcode. |
PooledByteBuffer | transformForRead(PooledByteBuffer pooledBuffer, StreamSourceFrameChannel channel, boolean lastFragmentOfFrame) Transform the supplied buffer per this extension. |
PooledByteBuffer | transformForWrite(PooledByteBuffer pooledBuffer, StreamSinkFrameChannel channel, boolean lastFrame) Transform the supplied buffer per this extension. |
int | writeRsv(int rsv) Add RSV bits (RSV1, RSV2, RSV3) to the current rsv status. |
public static final ExtensionFunction INSTANCE
public boolean hasExtensionOpCode()
ExtensionFunction
hasExtensionOpCode
in interface ExtensionFunction
true
if current extension defines specific Opcode false
is current extension does not define specific Opcodepublic int writeRsv(int rsv)
ExtensionFunction
writeRsv
in interface ExtensionFunction
rsv
- current RSV bits statuspublic PooledByteBuffer transformForWrite(PooledByteBuffer pooledBuffer, StreamSinkFrameChannel channel, boolean lastFrame) throws IOException
ExtensionFunction
transformForWrite
in interface ExtensionFunction
pooledBuffer
- Buffer to transformchannel
- working channelIOException
public PooledByteBuffer transformForRead(PooledByteBuffer pooledBuffer, StreamSourceFrameChannel channel, boolean lastFragmentOfFrame) throws IOException
ExtensionFunction
transformForRead
in interface ExtensionFunction
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 frameIOException
public void dispose()
ExtensionFunction
dispose
in interface ExtensionFunction
Copyright © 2020 JBoss by Red Hat. All rights reserved.