java.lang.Object
org.apache.qpid.jms.provider.amqp.message.AmqpCodec

public final class AmqpCodec extends Object
AMQP Codec class used to hide the details of encode / decode
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.apache.qpid.proton.amqp.messaging.Section
    decode(io.netty.buffer.ByteBuf encoded)
    Given an encoded AMQP Section, decode the value previously written there.
    decodeMessage(AmqpConsumer consumer, org.apache.qpid.proton.codec.ReadableBuffer messageBytes)
    Create a new JmsMessage and underlying JmsMessageFacade that represents the proper message type for the incoming AMQP message.
    static io.netty.buffer.ByteBuf
    encode(org.apache.qpid.proton.amqp.messaging.Section section)
    Given an AMQP Section encode it and return the buffer holding the encoded value
    static io.netty.buffer.ByteBuf
    Given a Message instance, encode the Message to the wire level representation of that Message.
    static org.apache.qpid.proton.codec.DecoderImpl
     
    static org.apache.qpid.proton.codec.EncoderImpl
     

    Methods inherited from class java.lang.Object

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

    • AmqpCodec

      public AmqpCodec()
  • Method Details

    • getEncoder

      public static org.apache.qpid.proton.codec.EncoderImpl getEncoder()
      Returns:
      a Encoder instance.
    • getDecoder

      public static org.apache.qpid.proton.codec.DecoderImpl getDecoder()
      Returns:
      a Decoder instance.
    • encode

      public static io.netty.buffer.ByteBuf encode(org.apache.qpid.proton.amqp.messaging.Section section)
      Given an AMQP Section encode it and return the buffer holding the encoded value
      Parameters:
      section - the AMQP Section value to encode.
      Returns:
      a buffer holding the encoded bytes of the given AMQP Section object.
    • decode

      public static org.apache.qpid.proton.amqp.messaging.Section decode(io.netty.buffer.ByteBuf encoded)
      Given an encoded AMQP Section, decode the value previously written there.
      Parameters:
      encoded - the AMQP Section value to decode.
      Returns:
      a Section object read from its encoded form.
    • encodeMessage

      public static io.netty.buffer.ByteBuf encodeMessage(AmqpJmsMessageFacade message)
      Given a Message instance, encode the Message to the wire level representation of that Message.
      Parameters:
      message - the Message that is to be encoded into the wire level representation.
      Returns:
      a buffer containing the wire level representation of the input Message.
    • decodeMessage

      public static AmqpJmsMessageFacade decodeMessage(AmqpConsumer consumer, org.apache.qpid.proton.codec.ReadableBuffer messageBytes) throws IOException
      Create a new JmsMessage and underlying JmsMessageFacade that represents the proper message type for the incoming AMQP message.
      Parameters:
      consumer - The AmqpConsumer instance that will be linked to the decoded message.
      messageBytes - The the raw bytes that compose the incoming message. (Read-Only)
      Returns:
      a AmqpJmsMessageFacade instance decoded from the message bytes.
      Throws:
      IOException - if an error occurs while creating the message objects.