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

public Class WebSocket00FrameEncoder

extends MessageToMessageEncoder<WebSocketFrame>
implements WebSocketFrameEncoder
Class Inheritance
All Implemented Interfaces
io.netty.handler.codec.http.websocketx.WebSocketFrameEncoder, io.netty.channel.ChannelOutboundHandler, io.netty.channel.ChannelHandler
Annotations
@Sharable
Imports
io.netty.buffer.ByteBuf, .Unpooled, io.netty.channel.ChannelHandler.Sharable, .ChannelHandlerContext, io.netty.handler.codec.MessageToMessageEncoder, java.util.List

Encodes a WebSocketFrame into a ByteBuf.

For the detailed instruction on adding add Web Socket support to your HTTP server, take a look into the WebSocketServer example located in the io.netty.example.http.websocket package.

Field Summary

Modifier and TypeField and Description
private static final ByteBuf
private static final ByteBuf
private static final ByteBuf

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected void
encode(ChannelHandlerContext ctx, WebSocketFrame
the message to encode to an other one
msg
,
List<Object>
the List into which the encoded msg should be added needs to do some kind of aggregation
out
)

Implements abstract io.netty.handler.codec.MessageToMessageEncoder.encode.

Encode from one message to an other.
Inherited from io.netty.handler.codec.MessageToMessageEncoder:
acceptOutboundMessagewrite

Field Detail

_0X00back to summary
private static final ByteBuf _0X00
_0XFFback to summary
private static final ByteBuf _0XFF
_0XFF_0X00back to summary
private static final ByteBuf _0XFF_0X00

Constructor Detail

WebSocket00FrameEncoderback to summary
public WebSocket00FrameEncoder()

Method Detail

encodeback to summary
protected void encode(ChannelHandlerContext ctx, WebSocketFrame msg, List<Object> out) throws Exception

Implements abstract io.netty.handler.codec.MessageToMessageEncoder.encode.

Doc from io.netty.handler.codec.MessageToMessageEncoder.encode.

Encode from one message to an other. This method will be called for each written message that can be handled by this encoder.

Parameters
ctx:ChannelHandlerContext

the ChannelHandlerContext which this MessageToMessageEncoder belongs to

msg:WebSocketFrame

the message to encode to an other one

out:List<Object>

the List into which the encoded msg should be added needs to do some kind of aggregation

Annotations
@Override
Exceptions
Exception:
is thrown if an error occurs