public void write(final ChannelHandlerContext ctx, final Object msg, final ChannelPromise promise)
throws Exception {
if (msg instanceof Frame) {
final Frame sockJSFrame = (Frame) msg;
if (sockJSFrame instanceof MessageFrame) {
final MessageFrame messageFrame = (MessageFrame) sockJSFrame;
final List<String> messages = messageFrame.messages();
for (String message : messages) {
ctx.write(new TextWebSocketFrame(message));
}
}
}