Top Fields Constructors Methods
io.undertow.websockets.core.protocol.version07

public final Class Masker

extends Object
implements ChannelFunction
Class Inheritance
All Implemented Interfaces
io.undertow.websockets.core.function.ChannelFunction
Imports
io.undertow.server.protocol.framed.FrameHeaderData, io.undertow.websockets.core.function.ChannelFunction, java.nio.ByteBuffer

Author
Norman Maurer

Field Summary

Modifier and TypeField and Description
pack-priv int
m

private byte[]

Constructor Summary

AccessConstructor and Description
pack-priv
Masker(int maskingKey)

Method Summary

Modifier and TypeMethod and Description
public void
afterRead(ByteBuffer
the ByteBuffer to operate on
buf
,
int
the index in the ByteBuffer to start from
position
,
int
the number of bytes to operate on
length
)

Implements io.undertow.websockets.core.function.ChannelFunction.afterRead.

Is called on the ByteBuffer after a read operation completes

public void
beforeWrite(ByteBuffer
the ByteBuffer to operate on
buf
,
int
the index in the ByteBuffer to start from
position
,
int
the number of bytes to operate on
length
)

Implements io.undertow.websockets.core.function.ChannelFunction.beforeWrite.

Is called on the ByteBuffer before a write operation completes

public void
private static byte[]
createsMaskingKey(int maskingKey)

private void
mask(ByteBuffer buf, int position, int length)

public void
public void
setMaskingKey(int maskingKey)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

mback to summary
pack-priv int m
maskingKeyback to summary
private byte[] maskingKey

Constructor Detail

Maskerback to summary
pack-priv Masker(int maskingKey)

Method Detail

afterReadback to summary
public void afterRead(ByteBuffer buf, int position, int length)

Implements io.undertow.websockets.core.function.ChannelFunction.afterRead.

Doc from io.undertow.websockets.core.function.ChannelFunction.afterRead.

Is called on the ByteBuffer after a read operation completes

Parameters
buf:ByteBuffer

the ByteBuffer to operate on

position:int

the index in the ByteBuffer to start from

length:int

the number of bytes to operate on

Annotations
@Override
beforeWriteback to summary
public void beforeWrite(ByteBuffer buf, int position, int length)

Implements io.undertow.websockets.core.function.ChannelFunction.beforeWrite.

Doc from io.undertow.websockets.core.function.ChannelFunction.beforeWrite.

Is called on the ByteBuffer before a write operation completes

Parameters
buf:ByteBuffer

the ByteBuffer to operate on

position:int

the index in the ByteBuffer to start from

length:int

the number of bytes to operate on

Annotations
@Override
completeback to summary
public void complete()

Implements io.undertow.websockets.core.function.ChannelFunction.complete.

Doc from io.undertow.websockets.core.function.ChannelFunction.complete.

Is called to complete the ChannelFunction. Access it after complete is called may result in unexpected behavior.

Annotations
@Override
createsMaskingKeyback to summary
private static byte[] createsMaskingKey(int maskingKey)
maskback to summary
private void mask(ByteBuffer buf, int position, int length)
newFrameback to summary
public void newFrame(FrameHeaderData headerData)

Implements io.undertow.websockets.core.function.ChannelFunction.newFrame.

Annotations
@Override
setMaskingKeyback to summary
public void setMaskingKey(int maskingKey)