public final class Masker extends Object implements ChannelFunction
Modifier and Type | Method and Description |
---|---|
void | afterRead(ByteBuffer buf, int position, int length) Is called on the ByteBuffer after a read operation completes |
void | beforeWrite(ByteBuffer buf, int position, int length) Is called on the ByteBuffer before a write operation completes |
void | complete() Is called to complete the ChannelFunction . |
void | newFrame(FrameHeaderData headerData) |
void | setMaskingKey(int maskingKey) |
public void setMaskingKey(int maskingKey)
public void newFrame(FrameHeaderData headerData)
newFrame
in interface ChannelFunction
public void afterRead(ByteBuffer buf, int position, int length)
ChannelFunction
ByteBuffer
after a read operation completesafterRead
in interface ChannelFunction
buf
- the ByteBuffer
to operate onposition
- the index in the ByteBuffer
to start fromlength
- the number of bytes to operate onpublic void beforeWrite(ByteBuffer buf, int position, int length)
ChannelFunction
ByteBuffer
before a write operation completesbeforeWrite
in interface ChannelFunction
buf
- the ByteBuffer
to operate onposition
- the index in the ByteBuffer
to start fromlength
- the number of bytes to operate onpublic void complete()
ChannelFunction
ChannelFunction
. Access it after complete is called may result in unexpected behavior.complete
in interface ChannelFunction
Copyright © 2017 JBoss by Red Hat. All rights reserved.