Top Description Fields Constructors Methods
io.netty.handler.codec.http.websocketx

public abstract Class WebSocketFrame

extends DefaultByteBufHolder
Class Inheritance
Known Direct Subclasses
io.netty.handler.codec.http.websocketx.BinaryWebSocketFrame, io.netty.handler.codec.http.websocketx.CloseWebSocketFrame, io.netty.handler.codec.http.websocketx.ContinuationWebSocketFrame, io.netty.handler.codec.http.websocketx.PingWebSocketFrame, io.netty.handler.codec.http.websocketx.PongWebSocketFrame, io.netty.handler.codec.http.websocketx.TextWebSocketFrame
Imports
io.netty.buffer.ByteBuf, .DefaultByteBufHolder, io.netty.util.internal.StringUtil

Base class for web socket frames.

Field Summary

Modifier and TypeField and Description
private final boolean
finalFragment

Flag to indicate if this frame is the final fragment in a message.

private final int
rsv

RSV1, RSV2, RSV3 used for extensions

Constructor Summary

AccessConstructor and Description
protected
WebSocketFrame(ByteBuf binaryData)

protected
WebSocketFrame(boolean finalFragment, int rsv, ByteBuf binaryData)

Method Summary

Modifier and TypeMethod and Description
public WebSocketFrame
public WebSocketFrame
public boolean
isFinalFragment()

Flag to indicate if this frame is the final fragment in a message.

public abstract WebSocketFrame
replace(ByteBuf content)

Redeclares io.netty.buffer.ByteBufHolder.replace.

Overrides io.netty.buffer.DefaultByteBufHolder.replace.

Returns a new ByteBufHolder which contains the specified content.
public WebSocketFrame
retain()

Overrides io.netty.buffer.DefaultByteBufHolder.retain.

Implements io.netty.buffer.ByteBufHolder.retain.

Increases the reference count by 1.
public WebSocketFrame
retain(int increment)

Overrides io.netty.buffer.DefaultByteBufHolder.retain.

Implements io.netty.buffer.ByteBufHolder.retain.

Increases the reference count by the specified increment.
public WebSocketFrame
public int
rsv()

Bits used for extensions to the standard.

public String
toString()

Overrides io.netty.buffer.DefaultByteBufHolder.toString.

Returns a string representation of the object.
public WebSocketFrame
touch()

Overrides io.netty.buffer.DefaultByteBufHolder.touch.

Implements io.netty.buffer.ByteBufHolder.touch.

Records the current access location of this object for debugging purposes.
public WebSocketFrame
touch(Object hint)

Overrides io.netty.buffer.DefaultByteBufHolder.touch.

Implements io.netty.buffer.ByteBufHolder.touch.

Records the current access location of this object with an additional arbitrary information for debugging purposes.
Inherited from io.netty.buffer.DefaultByteBufHolder:
contentcontentToStringequalshashCoderefCntreleaserelease

Field Detail

finalFragmentback to summary
private final boolean finalFragment

Flag to indicate if this frame is the final fragment in a message. The first fragment (frame) may also be the final fragment.

rsvback to summary
private final int rsv

RSV1, RSV2, RSV3 used for extensions

Constructor Detail

WebSocketFrameback to summary
protected WebSocketFrame(ByteBuf binaryData)
WebSocketFrameback to summary
protected WebSocketFrame(boolean finalFragment, int rsv, ByteBuf binaryData)

Method Detail

copyback to summary
public WebSocketFrame copy()

Overrides io.netty.buffer.DefaultByteBufHolder.copy.

Implements io.netty.buffer.ByteBufHolder.copy.

Doc from io.netty.buffer.DefaultByteBufHolder.copy.

Creates a deep copy of this ByteBufHolder.

This method calls replace(content().copy()) by default.

Annotations
@Override
duplicateback to summary
public WebSocketFrame duplicate()

Overrides io.netty.buffer.DefaultByteBufHolder.duplicate.

Implements io.netty.buffer.ByteBufHolder.duplicate.

Doc from io.netty.buffer.DefaultByteBufHolder.duplicate.

Duplicates this ByteBufHolder. Be aware that this will not automatically call retain().

This method calls replace(content().duplicate()) by default.

Annotations
@Override
isFinalFragmentback to summary
public boolean isFinalFragment()

Flag to indicate if this frame is the final fragment in a message. The first fragment (frame) may also be the final fragment.

replaceback to summary
public abstract WebSocketFrame replace(ByteBuf content)

Redeclares io.netty.buffer.ByteBufHolder.replace.

Overrides io.netty.buffer.DefaultByteBufHolder.replace.

Doc from io.netty.buffer.DefaultByteBufHolder.replace.

Returns a new ByteBufHolder which contains the specified content.

Override this method to return a new instance of this object whose content is set to the specified content. The default implementation of copy(), duplicate() and retainedDuplicate() invokes this method to create a copy.

Annotations
@Override
retainback to summary
public WebSocketFrame retain()

Overrides io.netty.buffer.DefaultByteBufHolder.retain.

Implements io.netty.buffer.ByteBufHolder.retain.

Doc from io.netty.util.ReferenceCounted.retain.

Increases the reference count by 1.

Annotations
@Override
retainback to summary
public WebSocketFrame retain(int increment)

Overrides io.netty.buffer.DefaultByteBufHolder.retain.

Implements io.netty.buffer.ByteBufHolder.retain.

Doc from io.netty.util.ReferenceCounted.retain.

Increases the reference count by the specified increment.

Annotations
@Override
retainedDuplicateback to summary
public WebSocketFrame retainedDuplicate()

Overrides io.netty.buffer.DefaultByteBufHolder.retainedDuplicate.

Implements io.netty.buffer.ByteBufHolder.retainedDuplicate.

Doc from io.netty.buffer.DefaultByteBufHolder.retainedDuplicate.

Duplicates this ByteBufHolder. This method returns a retained duplicate unlike duplicate().

This method calls replace(content().retainedDuplicate()) by default.

Annotations
@Override
rsvback to summary
public int rsv()

Bits used for extensions to the standard.

toStringback to summary
public String toString()

Overrides io.netty.buffer.DefaultByteBufHolder.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override
touchback to summary
public WebSocketFrame touch()

Overrides io.netty.buffer.DefaultByteBufHolder.touch.

Implements io.netty.buffer.ByteBufHolder.touch.

Doc from io.netty.util.ReferenceCounted.touch.

Records the current access location of this object for debugging purposes. If this object is determined to be leaked, the information recorded by this operation will be provided to you via ResourceLeakDetector. This method is a shortcut to touch(null).

Annotations
@Override
touchback to summary
public WebSocketFrame touch(Object hint)

Overrides io.netty.buffer.DefaultByteBufHolder.touch.

Implements io.netty.buffer.ByteBufHolder.touch.

Doc from io.netty.util.ReferenceCounted.touch.

Records the current access location of this object with an additional arbitrary information for debugging purposes. If this object is determined to be leaked, the information recorded by this operation will be provided to you via ResourceLeakDetector.

Annotations
@Override