Package hec.jms

Class GenericMessage

java.lang.Object
hec.jms.GenericMessage
Direct Known Subclasses:
TSDataStored

public abstract class GenericMessage extends Object
Base class for jms message encapsulation.
  • Constructor Details

    • GenericMessage

      public GenericMessage(javax.jms.MapMessage mapMessage)
      Receives a reference to the data exchange message.
  • Method Details

    • addClass

      protected static void addClass(Class<? extends GenericMessage> clazz, GenericMessage.MessageDefinition definition)
    • getRequiredMapKeys

      public static Set<String> getRequiredMapKeys(Class clazz)
    • getClassType

      public static String getClassType(Class clazz)
    • getClassSubType

      public static String getClassSubType(Class clazz)
    • getMap

      public Map<String,Object> getMap() throws javax.jms.JMSException
      Throws:
      javax.jms.JMSException
    • getString

      public String getString(String key) throws javax.jms.JMSException
      Performs a String map lookup on the encapsulated message for the argument key value.
      Parameters:
      key - Map key to look up.
      Returns:
      String value that the lookup returns.
      Throws:
      javax.jms.JMSException - generated by the message map lookup.
    • getLong

      public long getLong(String key) throws javax.jms.JMSException
      Performs a long map lookup on the encapsulated message for the argument key value.
      Parameters:
      key - Map key to lookup.
      Returns:
      The long value associated with the key
      Throws:
      javax.jms.JMSException - generated by the message map lookup.
    • getInt

      public int getInt(String key) throws javax.jms.JMSException
      Performs an int map lookup on the encapsulated message for the arguement key value.
      Parameters:
      key - Map key to lookup
      Returns:
      The int value associated with the key.
      Throws:
      javax.jms.JMSException
    • getBody

      protected String getBody() throws javax.jms.JMSException
      Returns the "body" map value of this message as text.
      Returns:
      String the message body.
      Throws:
      javax.jms.JMSException
    • getType

      public String getType() throws javax.jms.JMSException
      Returns the "type" map value that all data exchange messages support.
      Returns:
      String The type of the encapsulated message.
      Throws:
      javax.jms.JMSException
    • getSubType

      public String getSubType() throws javax.jms.JMSException
      Returns the "subtype" map value that a majority of the data exchange messages support.
      Returns:
      String The subtype of the encapsulated message.
      Throws:
      javax.jms.JMSException
    • getCreationTime

      public long getCreationTime() throws javax.jms.JMSException
      Returns the creation time map value of the encapsulated message as a java long ms value.
      Throws:
      javax.jms.JMSException