Class NettyWritable

  • All Implemented Interfaces:
    org.apache.qpid.proton.codec.WritableBuffer

    public class NettyWritable
    extends java.lang.Object
    implements org.apache.qpid.proton.codec.WritableBuffer
    WritableBuffer implementation that wraps a Netty ByteBuf to allow use of Netty buffers to be used when encoding AMQP messages.
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface org.apache.qpid.proton.codec.WritableBuffer

        org.apache.qpid.proton.codec.WritableBuffer.ByteBufferWrapper
    • Constructor Summary

      Constructors 
      Constructor Description
      NettyWritable​(io.netty.buffer.ByteBuf nettyBuffer)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void ensureRemaining​(int remaining)  
      io.netty.buffer.ByteBuf getByteBuf()  
      boolean hasRemaining()  
      int limit()  
      int position()  
      void position​(int position)  
      void put​(byte b)  
      void put​(byte[] src, int offset, int length)  
      void put​(io.netty.buffer.ByteBuf payload)  
      void put​(java.lang.String value)  
      void put​(java.nio.ByteBuffer payload)  
      void put​(org.apache.qpid.proton.codec.ReadableBuffer buffer)  
      void putDouble​(double d)  
      void putFloat​(float f)  
      void putInt​(int i)  
      void putLong​(long l)  
      void putShort​(short s)  
      int remaining()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • NettyWritable

        public NettyWritable​(io.netty.buffer.ByteBuf nettyBuffer)
    • Method Detail

      • getByteBuf

        public io.netty.buffer.ByteBuf getByteBuf()
      • put

        public void put​(byte b)
        Specified by:
        put in interface org.apache.qpid.proton.codec.WritableBuffer
      • putFloat

        public void putFloat​(float f)
        Specified by:
        putFloat in interface org.apache.qpid.proton.codec.WritableBuffer
      • putDouble

        public void putDouble​(double d)
        Specified by:
        putDouble in interface org.apache.qpid.proton.codec.WritableBuffer
      • put

        public void put​(byte[] src,
                        int offset,
                        int length)
        Specified by:
        put in interface org.apache.qpid.proton.codec.WritableBuffer
      • putShort

        public void putShort​(short s)
        Specified by:
        putShort in interface org.apache.qpid.proton.codec.WritableBuffer
      • putInt

        public void putInt​(int i)
        Specified by:
        putInt in interface org.apache.qpid.proton.codec.WritableBuffer
      • putLong

        public void putLong​(long l)
        Specified by:
        putLong in interface org.apache.qpid.proton.codec.WritableBuffer
      • hasRemaining

        public boolean hasRemaining()
        Specified by:
        hasRemaining in interface org.apache.qpid.proton.codec.WritableBuffer
      • remaining

        public int remaining()
        Specified by:
        remaining in interface org.apache.qpid.proton.codec.WritableBuffer
      • ensureRemaining

        public void ensureRemaining​(int remaining)
        Specified by:
        ensureRemaining in interface org.apache.qpid.proton.codec.WritableBuffer
      • position

        public int position()
        Specified by:
        position in interface org.apache.qpid.proton.codec.WritableBuffer
      • position

        public void position​(int position)
        Specified by:
        position in interface org.apache.qpid.proton.codec.WritableBuffer
      • put

        public void put​(java.nio.ByteBuffer payload)
        Specified by:
        put in interface org.apache.qpid.proton.codec.WritableBuffer
      • put

        public void put​(io.netty.buffer.ByteBuf payload)
      • put

        public void put​(java.lang.String value)
        Specified by:
        put in interface org.apache.qpid.proton.codec.WritableBuffer
      • limit

        public int limit()
        Specified by:
        limit in interface org.apache.qpid.proton.codec.WritableBuffer
      • put

        public void put​(org.apache.qpid.proton.codec.ReadableBuffer buffer)
        Specified by:
        put in interface org.apache.qpid.proton.codec.WritableBuffer