Class MapBody

java.lang.Object
com.swiftmq.impl.streams.comp.message.MapBody

public class MapBody extends Object
Facade to wrap the body of a javax.jms.MapMessage
Author:
IIT Software GmbH, Muenster/Germany, (c) 2016, All Rights Reserved
  • Method Details

    • names

      public String[] names() throws JMSException
      Returns an array of names (keys) of the map.
      Returns:
      array of names
      Throws:
      JMSException
    • get

      public MapValue get(String name)
      Get a map value.
      Parameters:
      name - key
      Returns:
      value
    • set

      public MapBody set(String name, Object value) throws JMSException
      Sets a map value.
      Parameters:
      name - key
      value - value
      Returns:
      MapBody
      Throws:
      JMSException
    • toJson

      public String toJson() throws Exception
      Converts this body into a Json
      Returns:
      json
      Throws:
      Exception
    • message

      public MapMessage message()
      Returns a reference to the message.
      Returns:
      MapMessage
    • clear

      public MapBody clear() throws JMSException
      Clears the body.
      Returns:
      MapBody
      Throws:
      JMSException