jms4spread
Class Message

java.lang.Object
  |
  +--jms4spread.Message
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
BytesMessage, MapMessage, ObjectMessage, StreamMessage, TextMessage

public class Message
extends java.lang.Object
implements java.io.Serializable

A basic Message Class that supports the 5 Message Types.

See Also:
Serialized Form

Field Summary
static int DEFAULT_DELIVERY_MODE
          The Default Delivery Mode is NON_PERISTANT.
static int DEFAULT_PRIORITY
          The Default Priority is 4
static int DEFAULT_TIME_TO_LIVE
          The Default time to live is unlimmited
 
Method Summary
 void clearBody()
          Clears the body of the message.
 void clearProperties()
          Clears the properties of the message.
 java.lang.String getJMSCorrelationID()
          Gets the JMSCorrelationID of the message
 byte[] getJMSCorrelationIDAsBytes()
          Gets the JMSCorrelationID of the message as Bytes
 int getJMSDeliveryMode()
          Gets the JMSDeliveryMode for the message
 Destination getJMSDestination()
          Gets the Destination for the message
 long getJMSExpiration()
          Gets the Expiration for the Message
 java.lang.String getJMSMessageType()
          Get the Message Type
 int getJMSPriority()
          Gets the priority for the Message
 boolean getJMSRedelivered()
          Gives an indication if the message is Redelivered
 Destination getJMSReplyTo()
          Gets the Destination Object to which the Reply should be sent
 java.lang.String getMessageID()
          Gets the ID for the Message
 long JMSTimeStamp()
          Gets the JMS Time Stamp
 void setJMSCorrelationID(java.lang.String CorrelationID)
          Sets the JMSCorrelationID of the message
 void setJMSCorrelationIDAsBytes(byte[] correlationID)
          Sets the JMSCorrelationID of the message as Bytes
 void setJMSDeliveryMode(int deliveryMode)
          Sets the JMSDeliveryMode for the message.
 void setJMSDestination(Destination destination)
          sets the Destination for the message
 void setJMSExpiration(long expiration)
          Sets the Expiration for the Message
 void setJMSMessageType(java.lang.String messType)
          Sets the Message Type
 void setJMSPriority(int priority)
          Sets the priority for the Message This priority is not used by the messaging system
 void setJMSRedelivered(boolean redelivered)
          Indicated that the message is being redelivered
 void setJMSReplyTo(Destination replyTo)
          Gets the Destination Object to which the Reply should be sent
 void setJMSTimeStamp(long timeStamp)
          Sets the JMS Time Stamp
 void setMessageID(java.lang.String messageID)
          Sets the ID for the Message
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_DELIVERY_MODE

public static int DEFAULT_DELIVERY_MODE
The Default Delivery Mode is NON_PERISTANT. The PERSISTANT Mode is not yet supported

DEFAULT_PRIORITY

public static int DEFAULT_PRIORITY
The Default Priority is 4

DEFAULT_TIME_TO_LIVE

public static int DEFAULT_TIME_TO_LIVE
The Default time to live is unlimmited
Method Detail

clearBody

public void clearBody()
               throws JMSException
Clears the body of the message. Method is and must be overridden by subclasses

clearProperties

public void clearProperties()
Clears the properties of the message.

getJMSCorrelationID

public java.lang.String getJMSCorrelationID()
Gets the JMSCorrelationID of the message

setJMSCorrelationID

public void setJMSCorrelationID(java.lang.String CorrelationID)
Sets the JMSCorrelationID of the message

getJMSCorrelationIDAsBytes

public byte[] getJMSCorrelationIDAsBytes()
Gets the JMSCorrelationID of the message as Bytes

setJMSCorrelationIDAsBytes

public void setJMSCorrelationIDAsBytes(byte[] correlationID)
Sets the JMSCorrelationID of the message as Bytes

getJMSDeliveryMode

public int getJMSDeliveryMode()
Gets the JMSDeliveryMode for the message

setJMSDeliveryMode

public void setJMSDeliveryMode(int deliveryMode)
Sets the JMSDeliveryMode for the message. Only NON_PERSISTANT Mode is supported

getJMSDestination

public Destination getJMSDestination()
Gets the Destination for the message
Returns:
Destination Object

setJMSDestination

public void setJMSDestination(Destination destination)
sets the Destination for the message
Parameters:
Destination - Destination for the Message

getJMSExpiration

public long getJMSExpiration()
Gets the Expiration for the Message

setJMSExpiration

public void setJMSExpiration(long expiration)
Sets the Expiration for the Message

getMessageID

public java.lang.String getMessageID()
Gets the ID for the Message
Returns:
the messageID

setMessageID

public void setMessageID(java.lang.String messageID)
Sets the ID for the Message
Parameters:
messageID - the ID to be set

getJMSPriority

public int getJMSPriority()
Gets the priority for the Message
Returns:
the message priority

setJMSPriority

public void setJMSPriority(int priority)
Sets the priority for the Message This priority is not used by the messaging system
Parameters:
priority - message priority

getJMSRedelivered

public boolean getJMSRedelivered()
Gives an indication if the message is Redelivered
Returns:
a boolean indicating if the message is Redelivered or not

setJMSRedelivered

public void setJMSRedelivered(boolean redelivered)
Indicated that the message is being redelivered
Parameters:
redelivered - a boolean

getJMSReplyTo

public Destination getJMSReplyTo()
Gets the Destination Object to which the Reply should be sent
Returns:
Destination Object

setJMSReplyTo

public void setJMSReplyTo(Destination replyTo)
Gets the Destination Object to which the Reply should be sent
Parameters:
Destination - Object

JMSTimeStamp

public long JMSTimeStamp()
Gets the JMS Time Stamp
Returns:
the JMSTimeStamp

setJMSTimeStamp

public void setJMSTimeStamp(long timeStamp)
Sets the JMS Time Stamp
Parameters:
timeStamp - the JMSTimeStamp

getJMSMessageType

public java.lang.String getJMSMessageType()
Get the Message Type
Returns:
the message type

setJMSMessageType

public void setJMSMessageType(java.lang.String messType)
Sets the Message Type
Parameters:
messType - the message type