Class XmlCodecProvider

java.lang.Object
org.acemq.amqp.codec.xml.XmlCodecProvider
All Implemented Interfaces:
CodecProvider

public final class XmlCodecProvider extends Object implements CodecProvider
Announces XmlCodec to the engine as xml.
  • Constructor Details

    • XmlCodecProvider

      public XmlCodecProvider()
  • Method Details

    • name

      public String name()
      Specified by:
      name in interface CodecProvider
      Returns:
      the short name this format is asked for by, such as json or xml; lowercase, no spaces
    • create

      public Codec create()
      Specified by:
      create in interface CodecProvider
      Returns:
      a codec for this format
    • order

      public int order()
      Description copied from interface: CodecProvider
      Where this codec sits when several could read the same message.

      A consumer reads with every codec on the classpath, tried in this order, because a message whose sender set no content type has told us nothing and something usually still reads it. Lower numbers are tried first. Formats that recognise their own bytes belong near the front; a format that accepts anything belongs at the back, or it will answer for messages that were not meant for it.

      Specified by:
      order in interface CodecProvider
      Returns:
      the sort key; 500 is a reasonable default for a new format