}
@Override
public void handle(WebSocketPacketMessage webSocketPacketMessage, Channel channel) throws IOException {
ChannelBuffer message = encoder.encodePacket(webSocketPacketMessage.getPacket());
WebSocketFrame res = new TextWebSocketFrame(message);
log.trace("Out message: {} sessionId: {}", new Object[] {
message.toString(CharsetUtil.UTF_8), webSocketPacketMessage.getSessionId()});
if (channel.isOpen()) {
channel.write(res);
} else {