Class NettyReadable

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

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

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

        org.apache.qpid.proton.codec.ReadableBuffer.ByteBufferReader
    • Constructor Summary

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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      byte[] array()  
      int arrayOffset()  
      java.nio.ByteBuffer byteBuffer()  
      int capacity()  
      org.apache.qpid.proton.codec.ReadableBuffer clear()  
      org.apache.qpid.proton.codec.ReadableBuffer duplicate()  
      boolean equals​(java.lang.Object other)  
      org.apache.qpid.proton.codec.ReadableBuffer flip()  
      byte get()  
      org.apache.qpid.proton.codec.ReadableBuffer get​(byte[] data)  
      org.apache.qpid.proton.codec.ReadableBuffer get​(byte[] data, int offset, int length)  
      byte get​(int index)  
      org.apache.qpid.proton.codec.ReadableBuffer get​(org.apache.qpid.proton.codec.WritableBuffer target)  
      io.netty.buffer.ByteBuf getByteBuf()  
      double getDouble()  
      float getFloat()  
      int getInt()  
      long getLong()  
      short getShort()  
      boolean hasArray()  
      int hashCode()  
      boolean hasRemaining()  
      int limit()  
      org.apache.qpid.proton.codec.ReadableBuffer limit​(int limit)  
      org.apache.qpid.proton.codec.ReadableBuffer mark()  
      int position()  
      org.apache.qpid.proton.codec.ReadableBuffer position​(int position)  
      java.lang.String readString​(java.nio.charset.CharsetDecoder decoder)  
      java.lang.String readUTF8()  
      org.apache.qpid.proton.codec.ReadableBuffer reclaimRead()  
      int remaining()  
      org.apache.qpid.proton.codec.ReadableBuffer reset()  
      org.apache.qpid.proton.codec.ReadableBuffer rewind()  
      org.apache.qpid.proton.codec.ReadableBuffer slice()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • NettyReadable

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

      • getByteBuf

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

        public byte get()
        Specified by:
        get in interface org.apache.qpid.proton.codec.ReadableBuffer
      • getInt

        public int getInt()
        Specified by:
        getInt in interface org.apache.qpid.proton.codec.ReadableBuffer
      • getLong

        public long getLong()
        Specified by:
        getLong in interface org.apache.qpid.proton.codec.ReadableBuffer
      • getShort

        public short getShort()
        Specified by:
        getShort in interface org.apache.qpid.proton.codec.ReadableBuffer
      • getFloat

        public float getFloat()
        Specified by:
        getFloat in interface org.apache.qpid.proton.codec.ReadableBuffer
      • getDouble

        public double getDouble()
        Specified by:
        getDouble in interface org.apache.qpid.proton.codec.ReadableBuffer
      • get

        public org.apache.qpid.proton.codec.ReadableBuffer get​(byte[] data,
                                                               int offset,
                                                               int length)
        Specified by:
        get in interface org.apache.qpid.proton.codec.ReadableBuffer
      • get

        public org.apache.qpid.proton.codec.ReadableBuffer get​(byte[] data)
        Specified by:
        get in interface org.apache.qpid.proton.codec.ReadableBuffer
      • position

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

        public org.apache.qpid.proton.codec.ReadableBuffer slice()
        Specified by:
        slice in interface org.apache.qpid.proton.codec.ReadableBuffer
      • flip

        public org.apache.qpid.proton.codec.ReadableBuffer flip()
        Specified by:
        flip in interface org.apache.qpid.proton.codec.ReadableBuffer
      • limit

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

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

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

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

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

        public org.apache.qpid.proton.codec.ReadableBuffer duplicate()
        Specified by:
        duplicate in interface org.apache.qpid.proton.codec.ReadableBuffer
      • byteBuffer

        public java.nio.ByteBuffer byteBuffer()
        Specified by:
        byteBuffer in interface org.apache.qpid.proton.codec.ReadableBuffer
      • readUTF8

        public java.lang.String readUTF8()
        Specified by:
        readUTF8 in interface org.apache.qpid.proton.codec.ReadableBuffer
      • array

        public byte[] array()
        Specified by:
        array in interface org.apache.qpid.proton.codec.ReadableBuffer
      • arrayOffset

        public int arrayOffset()
        Specified by:
        arrayOffset in interface org.apache.qpid.proton.codec.ReadableBuffer
      • capacity

        public int capacity()
        Specified by:
        capacity in interface org.apache.qpid.proton.codec.ReadableBuffer
      • clear

        public org.apache.qpid.proton.codec.ReadableBuffer clear()
        Specified by:
        clear in interface org.apache.qpid.proton.codec.ReadableBuffer
      • reclaimRead

        public org.apache.qpid.proton.codec.ReadableBuffer reclaimRead()
        Specified by:
        reclaimRead in interface org.apache.qpid.proton.codec.ReadableBuffer
      • get

        public byte get​(int index)
        Specified by:
        get in interface org.apache.qpid.proton.codec.ReadableBuffer
      • hasArray

        public boolean hasArray()
        Specified by:
        hasArray in interface org.apache.qpid.proton.codec.ReadableBuffer
      • mark

        public org.apache.qpid.proton.codec.ReadableBuffer mark()
        Specified by:
        mark in interface org.apache.qpid.proton.codec.ReadableBuffer
      • readString

        public java.lang.String readString​(java.nio.charset.CharsetDecoder decoder)
                                    throws java.nio.charset.CharacterCodingException
        Specified by:
        readString in interface org.apache.qpid.proton.codec.ReadableBuffer
        Throws:
        java.nio.charset.CharacterCodingException
      • reset

        public org.apache.qpid.proton.codec.ReadableBuffer reset()
        Specified by:
        reset in interface org.apache.qpid.proton.codec.ReadableBuffer
      • rewind

        public org.apache.qpid.proton.codec.ReadableBuffer rewind()
        Specified by:
        rewind in interface org.apache.qpid.proton.codec.ReadableBuffer
      • get

        public org.apache.qpid.proton.codec.ReadableBuffer get​(org.apache.qpid.proton.codec.WritableBuffer target)
        Specified by:
        get in interface org.apache.qpid.proton.codec.ReadableBuffer
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object