Package org.hornetq.core.buffers.impl

Examples of org.hornetq.core.buffers.impl.ChannelBufferWrapper


         ConnectionCreator channelHandler = nettyAcceptor.createConnectionCreator();
         ChannelPipeline pipeline = ctx.pipeline();
         protocolManagerToUse.addChannelHandlers(pipeline);
         pipeline.addLast("handler", channelHandler);
         NettyServerConnection connection = channelHandler.createConnection(ctx, protocolToUse, httpEnabled);
         protocolManagerToUse.handshake(connection, new ChannelBufferWrapper(in));
         pipeline.remove(this);
         ctx.flush();
      }
View Full Code Here


    }

    @Override
    public HornetQBuffer createBuffer(int size)
    {
        return new ChannelBufferWrapper(channel.alloc().directBuffer(size), true);
    }
View Full Code Here

         ConnectionCreator channelHandler = nettyAcceptor.createConnectionCreator();
         ChannelPipeline pipeline = ctx.pipeline();
         protocolManagerToUse.addChannelHandlers(pipeline);
         pipeline.addLast("handler", channelHandler);
         NettyServerConnection connection = channelHandler.createConnection(ctx, protocolToUse, httpEnabled);
         protocolManagerToUse.handshake(connection, new ChannelBufferWrapper(in));
         pipeline.remove(this);
      }
View Full Code Here

    * @param size the size of the created HornetQBuffer
    * @return a fixed HornetQBuffer with the given size
    */
   public static HornetQBuffer fixedBuffer(final int size)
   {
      return new ChannelBufferWrapper(Unpooled.buffer(size, size));
   }
View Full Code Here

    * @param size the initial size of the created HornetQBuffer
    * @return a self-expanding HornetQBuffer starting with the given size
    */
   public static HornetQBuffer dynamicBuffer(final int size)
   {
      return new ChannelBufferWrapper(Unpooled.buffer(size));
   }
View Full Code Here

    * @param underlying the underlying NIO ByteBuffer
    * @return a HornetQBuffer wrapping the underlying NIO ByteBuffer
    */
   public static HornetQBuffer wrappedBuffer(final ByteBuffer underlying)
   {
      HornetQBuffer buff = new ChannelBufferWrapper(Unpooled.wrappedBuffer(underlying));

      buff.clear();

      return buff;
   }
View Full Code Here

    * @param underlying the underlying byte array
    * @return a HornetQBuffer wrapping the underlying byte array
    */
   public static HornetQBuffer wrappedBuffer(final byte[] underlying)
   {
      return new ChannelBufferWrapper(Unpooled.wrappedBuffer(underlying));
   }
View Full Code Here

   @Override
   public void messageReceived(final ChannelHandlerContext ctx, final MessageEvent e) throws Exception
   {
      ChannelBuffer buffer = (ChannelBuffer)e.getMessage();
     
      handler.bufferReceived(e.getChannel().getId(), new ChannelBufferWrapper(buffer));     
   }
View Full Code Here

      listener.connectionDestroyed(getID());
   }

   public HornetQBuffer createBuffer(final int size)
   {
      return new ChannelBufferWrapper(ChannelBuffers.dynamicBuffer(size));
   }
View Full Code Here

      listener.connectionDestroyed(getID());
   }

   public HornetQBuffer createBuffer(final int size)
   {
      return new ChannelBufferWrapper(ChannelBuffers.dynamicBuffer(size));
   }
View Full Code Here

TOP

Related Classes of org.hornetq.core.buffers.impl.ChannelBufferWrapper

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.