Class NettyWritable

java.lang.Object
org.apache.activemq.artemis.protocol.amqp.util.NettyWritable
All Implemented Interfaces:
org.apache.qpid.proton.codec.WritableBuffer

public class NettyWritable extends 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.
  • Constructor Details

    • NettyWritable

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

    • 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(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(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