@ChannelHandler.Sharable public class WebSocket00FrameEncoder extends OneToOneEncoder
WebSocketFrame
into a ChannelBuffer
.
For the detailed instruction on adding add Web Socket support to your HTTP server, take a look into the
WebSocketServer example located in the org.jboss.netty.example.http.websocket
package.
ChannelHandler.Sharable
构造器和说明 |
---|
WebSocket00FrameEncoder() |
限定符和类型 | 方法和说明 |
---|---|
protected java.lang.Object |
encode(ChannelHandlerContext ctx,
Channel channel,
java.lang.Object msg)
Transforms the specified message into another message and return the
transformed message.
|
doEncode, handleDownstream
protected java.lang.Object encode(ChannelHandlerContext ctx, Channel channel, java.lang.Object msg) throws java.lang.Exception
OneToOneEncoder
null
, unlike
you can in OneToOneDecoder.decode(ChannelHandlerContext, Channel, Object)
;
you must return something, at least ChannelBuffers.EMPTY_BUFFER
.encode
在类中 OneToOneEncoder
java.lang.Exception