if (future.isSuccess()) {
final ChannelPipeline pipeline = future.channel().pipeline();
pipeline.remove(SockJsHandler.class);
pipeline.remove(CorsInboundHandler.class);
pipeline.remove(CorsOutboundHandler.class);
pipeline.replace(WebSocketTransport.class, "websocket-ha-proxy",
new WebSocketHAProxyTransport(haHandshaker));
pipeline.addLast(new WebSocketSendHandler());
}
}
});