public class TextWebsocketEncoder
extends org.jboss.netty.handler.codec.oneone.OneToOneEncoder
Event
object) to a TextWebSocketFrame
object. It uses
Gson
to do the Object to JSon String encoding.Modifier and Type | Field and Description |
---|---|
private com.google.gson.Gson |
gson |
Constructor and Description |
---|
TextWebsocketEncoder() |
Modifier and Type | Method and Description |
---|---|
protected Object |
encode(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.Channel channel,
Object msg) |
com.google.gson.Gson |
getGson() |
void |
setGson(com.google.gson.Gson gson) |
protected Object encode(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.Channel channel, Object msg) throws Exception
encode
in class org.jboss.netty.handler.codec.oneone.OneToOneEncoder
Exception
public com.google.gson.Gson getGson()
public void setGson(com.google.gson.Gson gson)
Copyright © 2013. All Rights Reserved.