Package hec.jms
Class GenericMessage
java.lang.Object
hec.jms.GenericMessage
- Direct Known Subclasses:
TSDataStored
Base class for jms message encapsulation.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionGenericMessage(javax.jms.MapMessage mapMessage) Receives a reference to the data exchange message. -
Method Summary
Modifier and TypeMethodDescriptionprotected static voidaddClass(Class<? extends GenericMessage> clazz, GenericMessage.MessageDefinition definition) protected StringgetBody()Returns the "body" map value of this message as text.static StringgetClassSubType(Class clazz) static StringgetClassType(Class clazz) longReturns the creation time map value of the encapsulated message as a java long ms value.intPerforms an int map lookup on the encapsulated message for the arguement key value.longPerforms a long map lookup on the encapsulated message for the argument key value.getMap()getRequiredMapKeys(Class clazz) Performs a String map lookup on the encapsulated message for the argument key value.Returns the "subtype" map value that a majority of the data exchange messages support.getType()Returns the "type" map value that all data exchange messages support.
-
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
-
getClassType
-
getClassSubType
-
getMap
- Throws:
javax.jms.JMSException
-
getString
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
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
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
Returns the "body" map value of this message as text.- Returns:
- String the message body.
- Throws:
javax.jms.JMSException
-
getType
Returns the "type" map value that all data exchange messages support.- Returns:
- String The type of the encapsulated message.
- Throws:
javax.jms.JMSException
-
getSubType
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.JMSExceptionReturns the creation time map value of the encapsulated message as a java long ms value.- Throws:
javax.jms.JMSException
-