public class TextWebsocketDecoder
extends org.jboss.netty.handler.codec.oneone.OneToOneDecoder
TextWebSocketFrame
to an
Event
. The incoming data is expected to be a JSon string
representation of an Event object. This class uses Gson
to do the
decoding to DefaultEvent
. If the incoming event is of type
Events.NETWORK_MESSAGE
then it will be converted to
Events.SESSION_MESSAGE
.Modifier and Type | Field and Description |
---|---|
private com.google.gson.Gson |
gson |
private static org.slf4j.Logger |
LOG |
Constructor and Description |
---|
TextWebsocketDecoder() |
protected Object decode(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.Channel channel, Object msg) throws Exception
decode
in class org.jboss.netty.handler.codec.oneone.OneToOneDecoder
Exception
public com.google.gson.Gson getGson()
public void setGson(com.google.gson.Gson gson)
Copyright © 2013. All Rights Reserved.