if (httpUpgradeEnabled)
{
// prepare to handle a HTTP 101 response to upgrade the protocol.
final HttpClientCodec httpClientCodec = new HttpClientCodec();
pipeline.addLast(httpClientCodec);
pipeline.addLast("http-upgrade", new HttpUpgradeHandler(pipeline, httpClientCodec));
}
pipeline.addLast(new HornetQFrameDecoder2());
pipeline.addLast(new HornetQClientChannelHandler(channelGroup, handler, new Listener()));