com.j_spaces.jms
Class GSMessageImpl

java.lang.Object
  extended by com.j_spaces.core.client.MetaDataEntry
      extended by com.j_spaces.jms.GSMessageImpl
All Implemented Interfaces:
IMetaDataEntry, Externalizable, Serializable, Entry
Direct Known Subclasses:
GSBytesMessageImpl, GSMapMessageImpl, GSObjectMessageImpl, GSSimpleMessageImpl, GSStreamMessageImpl, GSTextMessageImpl

public class GSMessageImpl
extends MetaDataEntry
implements Externalizable

See Also:
Serialized Form

Field Summary
 Object Body
          Message body
static String BODY_STR_NAME
           
static String BYTES
          A bytes message carries an array of bytes.
 String DestinationName
          Routing index.
static String JMS_CORRELATION_ID
           
static String JMS_DELIVERY_MODE
           
static String JMS_DESTINATION
           
static String JMS_EXPIRATION
           
static String JMS_GSCONNECTION_KEY_NAME
           
static String JMS_GSCONVERTER
           
static String JMS_GSPRODUCER_KEY_PROP_NAME
           
static String JMS_GSTTL_KEY_PROP_NAME
           
static String JMS_MESSAGE_ID
           
static String JMS_PRIORITY
           
static String JMS_REDELIVERED
           
static String JMS_REPLY_TO
           
static String JMS_TIMESTAMP
           
static String JMS_TYPE
           
 Object JMSCorrelationID
          JMSCorrelationID header
 Integer JMSDeliveryMode
          JMSDeliveryMode header
 Destination JMSDestination
          JMSDestination header
 Long JMSExpiration
          JMSExpiration header
 String JMSMessageID
          JMSMessageID header
 Integer JMSPriority
          JMSPriority header
 Boolean JMSRedelivered
          JMSRedelivered header
 Destination JMSReplyTo
          JMSReplyTo header
 Long JMSTimestamp
          JMSTimestamp header
 String JMSType
          JMSType header
static String JMSX_GROUPID
           
static String JMSX_GROUPSEQ
           
static String JMSX_USERID
           
static String MAP
          A map message carries an hashtable.
static String OBJECT
          An object message carries a serializable object.
 Map<String,Object> Properties
          Message properties
static String PROPERTIES_STR_NAME
           
static String SIMPLE
          A simple message carries a simple empty body.
static String STREAM
          A stream message carries a bytes stream.
static String TEXT
          A text message carries a String body.
 
Constructor Summary
GSMessageImpl()
          Used internally only
GSMessageImpl(GSSessionImpl session, String type)
          Constructs a new GSMessageImpl instance.
 
Method Summary
static String[] __getSpaceIndexedFields()
           
 void acknowledge()
           
 void clearBody()
           
 void clearProperties()
           
 boolean equals(Object o)
           
 boolean getBooleanProperty(String name)
           
 byte getByteProperty(String name)
           
 String getDestinationName()
           
 double getDoubleProperty(String name)
           
 float getFloatProperty(String name)
           
 int getIntProperty(String name)
           
 String getJMSCorrelationID()
           
 byte[] getJMSCorrelationIDAsBytes()
           
 int getJMSDeliveryMode()
           
 Destination getJMSDestination()
           
 long getJMSExpiration()
           
 String getJMSMessageID()
           
 int getJMSPriority()
           
 boolean getJMSRedelivered()
           
 Destination getJMSReplyTo()
           
 long getJMSTimestamp()
           
 String getJMSType()
           
 long getLongProperty(String name)
           
 Object getObjectProperty(String name)
           
 Enumeration getPropertyNames()
           
 short getShortProperty(String name)
           
 String getStringProperty(String name)
           
 int hashCode()
           
 boolean propertyExists(String name)
           
 void readExternal(ObjectInput in)
           
 void setBooleanProperty(String name, boolean value)
           
 void setByteProperty(String name, byte value)
           
 void setDestinationName(String name)
           
 void setDoubleProperty(String name, double value)
           
 void setFloatProperty(String name, float value)
           
 void setIntProperty(String name, int value)
           
 void setJMSCorrelationID(String value)
           
 void setJMSCorrelationIDAsBytes(byte[] value)
           
 void setJMSDeliveryMode(int value)
           
 void setJMSDestination(Destination value)
           
 void setJMSExpiration(long value)
           
 void setJMSMessageID(String value)
           
 void setJMSPriority(int priority)
           
 void setJMSRedelivered(boolean redelivered)
           
 void setJMSReplyTo(Destination destination)
           
 void setJMSTimestamp(long timestamp)
           
 void setJMSType(String type)
           
 void setLongProperty(String name, long value)
           
 void setObjectProperty(String name, Object value)
           
 void setProperties(HashMap<String,Object> props)
          Sets the properties HashMap.
 void setRoutingIndexes(String[] indexes)
           
 void setShortProperty(String name, short value)
           
 void setStringProperty(String name, String value)
           
 String toString()
           
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class com.j_spaces.core.client.MetaDataEntry
__getEntryInfo, __setEntryInfo, isFifo, isNOWriteLeaseMode, isTransient, makePersistent, makeTransient, setFifo, setNOWriteLeaseMode
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

DestinationName

public String DestinationName
Routing index.


Body

public Object Body
Message body


JMSDestination

public Destination JMSDestination
JMSDestination header


JMSDeliveryMode

public Integer JMSDeliveryMode
JMSDeliveryMode header


JMSExpiration

public Long JMSExpiration
JMSExpiration header


JMSPriority

public Integer JMSPriority
JMSPriority header


JMSMessageID

public String JMSMessageID
JMSMessageID header


JMSTimestamp

public Long JMSTimestamp
JMSTimestamp header


JMSCorrelationID

public Object JMSCorrelationID
JMSCorrelationID header


JMSReplyTo

public Destination JMSReplyTo
JMSReplyTo header


JMSType

public String JMSType
JMSType header


JMSRedelivered

public Boolean JMSRedelivered
JMSRedelivered header


Properties

public Map<String,Object> Properties
Message properties


SIMPLE

public static final String SIMPLE
A simple message carries a simple empty body.

See Also:
Constant Field Values

TEXT

public static final String TEXT
A text message carries a String body.

See Also:
Constant Field Values

OBJECT

public static final String OBJECT
An object message carries a serializable object.

See Also:
Constant Field Values

MAP

public static final String MAP
A map message carries an hashtable.

See Also:
Constant Field Values

STREAM

public static final String STREAM
A stream message carries a bytes stream.

See Also:
Constant Field Values

BYTES

public static final String BYTES
A bytes message carries an array of bytes.

See Also:
Constant Field Values

BODY_STR_NAME

public static final String BODY_STR_NAME
See Also:
Constant Field Values

JMS_DESTINATION

public static final String JMS_DESTINATION
See Also:
Constant Field Values

JMS_DELIVERY_MODE

public static final String JMS_DELIVERY_MODE
See Also:
Constant Field Values

JMS_EXPIRATION

public static final String JMS_EXPIRATION
See Also:
Constant Field Values

JMS_PRIORITY

public static final String JMS_PRIORITY
See Also:
Constant Field Values

JMS_MESSAGE_ID

public static final String JMS_MESSAGE_ID
See Also:
Constant Field Values

JMS_TIMESTAMP

public static final String JMS_TIMESTAMP
See Also:
Constant Field Values

JMS_CORRELATION_ID

public static final String JMS_CORRELATION_ID
See Also:
Constant Field Values

JMS_REPLY_TO

public static final String JMS_REPLY_TO
See Also:
Constant Field Values

JMS_TYPE

public static final String JMS_TYPE
See Also:
Constant Field Values

JMS_REDELIVERED

public static final String JMS_REDELIVERED
See Also:
Constant Field Values

JMS_GSPRODUCER_KEY_PROP_NAME

public static final String JMS_GSPRODUCER_KEY_PROP_NAME
See Also:
Constant Field Values

JMS_GSTTL_KEY_PROP_NAME

public static final String JMS_GSTTL_KEY_PROP_NAME
See Also:
Constant Field Values

JMSX_GROUPID

public static final String JMSX_GROUPID
See Also:
Constant Field Values

JMSX_GROUPSEQ

public static final String JMSX_GROUPSEQ
See Also:
Constant Field Values

JMSX_USERID

public static final String JMSX_USERID
See Also:
Constant Field Values

PROPERTIES_STR_NAME

public static final String PROPERTIES_STR_NAME
See Also:
Constant Field Values

JMS_GSCONNECTION_KEY_NAME

public static final String JMS_GSCONNECTION_KEY_NAME
See Also:
Constant Field Values

JMS_GSCONVERTER

public static final String JMS_GSCONVERTER
See Also:
Constant Field Values
Constructor Detail

GSMessageImpl

public GSMessageImpl()
Used internally only


GSMessageImpl

public GSMessageImpl(GSSessionImpl session,
                     String type)
              throws JMSException
Constructs a new GSMessageImpl instance.

Parameters:
session - The session
type - The message type
Throws:
JMSException
Method Detail

__getSpaceIndexedFields

public static String[] __getSpaceIndexedFields()

setRoutingIndexes

public void setRoutingIndexes(String[] indexes)

acknowledge

public void acknowledge()
                 throws JMSException
Throws:
JMSException
See Also:
Message.acknowledge()

setDestinationName

public void setDestinationName(String name)

getDestinationName

public String getDestinationName()

clearBody

public void clearBody()
               throws JMSException
Throws:
JMSException
See Also:
Message.clearBody()

setJMSCorrelationID

public void setJMSCorrelationID(String value)
                         throws JMSException
Throws:
JMSException
See Also:
Message.setJMSCorrelationID(java.lang.String)

getJMSCorrelationID

public String getJMSCorrelationID()
                           throws JMSException
Throws:
JMSException
See Also:
Message.getJMSCorrelationID()

setJMSCorrelationIDAsBytes

public void setJMSCorrelationIDAsBytes(byte[] value)
                                throws JMSException
Throws:
JMSException
See Also:
Message.setJMSCorrelationIDAsBytes(byte[])

getJMSCorrelationIDAsBytes

public byte[] getJMSCorrelationIDAsBytes()
                                  throws JMSException
Throws:
JMSException
See Also:
Message.getJMSCorrelationIDAsBytes()

setJMSDeliveryMode

public void setJMSDeliveryMode(int value)
                        throws JMSException
Throws:
JMSException
See Also:
Message.setJMSDeliveryMode(int)

getJMSDeliveryMode

public int getJMSDeliveryMode()
                       throws JMSException
Throws:
JMSException
See Also:
Message.getJMSDeliveryMode()

setJMSDestination

public void setJMSDestination(Destination value)
                       throws JMSException
Throws:
JMSException
See Also:
Message.setJMSDestination(javax.jms.Destination)

getJMSDestination

public Destination getJMSDestination()
                              throws JMSException
Throws:
JMSException
See Also:
Message.getJMSDestination()

setJMSExpiration

public void setJMSExpiration(long value)
                      throws JMSException
Throws:
JMSException
See Also:
Message.setJMSExpiration(long)

getJMSExpiration

public long getJMSExpiration()
                      throws JMSException
Throws:
JMSException
See Also:
Message.getJMSExpiration()

setJMSMessageID

public void setJMSMessageID(String value)
                     throws JMSException
Throws:
JMSException
See Also:
Message.setJMSMessageID(java.lang.String)

getJMSMessageID

public String getJMSMessageID()
                       throws JMSException
Throws:
JMSException
See Also:
Message.getJMSMessageID()

setJMSPriority

public void setJMSPriority(int priority)
                    throws JMSException
Throws:
JMSException
See Also:
Message.setJMSPriority(int)

getJMSPriority

public int getJMSPriority()
                   throws JMSException
Throws:
JMSException
See Also:
Message.getJMSPriority()

setJMSRedelivered

public void setJMSRedelivered(boolean redelivered)
                       throws JMSException
Throws:
JMSException
See Also:
Message.setJMSRedelivered(boolean)

getJMSRedelivered

public boolean getJMSRedelivered()
                          throws JMSException
Throws:
JMSException
See Also:
Message.getJMSRedelivered()

setJMSReplyTo

public void setJMSReplyTo(Destination destination)
                   throws JMSException
Throws:
JMSException
See Also:
Message.setJMSReplyTo(javax.jms.Destination)

getJMSReplyTo

public Destination getJMSReplyTo()
                          throws JMSException
Throws:
JMSException
See Also:
Message.getJMSReplyTo()

setJMSTimestamp

public void setJMSTimestamp(long timestamp)
                     throws JMSException
Throws:
JMSException
See Also:
Message.setJMSTimestamp(long)

getJMSTimestamp

public long getJMSTimestamp()
                     throws JMSException
Throws:
JMSException
See Also:
Message.getJMSTimestamp()

setJMSType

public void setJMSType(String type)
                throws JMSException
Throws:
JMSException
See Also:
Message.setJMSType(java.lang.String)

getJMSType

public String getJMSType()
                  throws JMSException
Throws:
JMSException
See Also:
Message.getJMSType()

clearProperties

public void clearProperties()
                     throws JMSException
Throws:
JMSException
See Also:
Message.clearProperties()

getPropertyNames

public Enumeration getPropertyNames()
                             throws JMSException
Throws:
JMSException
See Also:
Message.getPropertyNames()

propertyExists

public boolean propertyExists(String name)
                       throws JMSException
Throws:
JMSException
See Also:
Message.propertyExists(java.lang.String)

getBooleanProperty

public boolean getBooleanProperty(String name)
                           throws JMSException
Throws:
JMSException
See Also:
Message.getBooleanProperty(java.lang.String)

getByteProperty

public byte getByteProperty(String name)
                     throws JMSException
Throws:
JMSException
See Also:
Message.getByteProperty(java.lang.String)

getDoubleProperty

public double getDoubleProperty(String name)
                         throws JMSException
Throws:
JMSException
See Also:
Message.getDoubleProperty(java.lang.String)

getFloatProperty

public float getFloatProperty(String name)
                       throws JMSException
Throws:
JMSException
See Also:
Message.getFloatProperty(java.lang.String)

getIntProperty

public int getIntProperty(String name)
                   throws JMSException
Throws:
JMSException
See Also:
Message.getIntProperty(java.lang.String)

getLongProperty

public long getLongProperty(String name)
                     throws JMSException
Throws:
JMSException
See Also:
Message.getLongProperty(java.lang.String)

getObjectProperty

public Object getObjectProperty(String name)
                         throws JMSException
Throws:
JMSException
See Also:
Message.getObjectProperty(java.lang.String)

getShortProperty

public short getShortProperty(String name)
                       throws JMSException
Throws:
JMSException
See Also:
Message.getShortProperty(java.lang.String)

getStringProperty

public String getStringProperty(String name)
                         throws JMSException
Throws:
JMSException
See Also:
Message.getStringProperty(java.lang.String)

setBooleanProperty

public void setBooleanProperty(String name,
                               boolean value)
                        throws JMSException
Throws:
JMSException
See Also:
Message.setBooleanProperty(java.lang.String, boolean)

setByteProperty

public void setByteProperty(String name,
                            byte value)
                     throws JMSException
Throws:
JMSException
See Also:
Message.setByteProperty(java.lang.String, byte)

setDoubleProperty

public void setDoubleProperty(String name,
                              double value)
                       throws JMSException
Throws:
JMSException
See Also:
Message.setDoubleProperty(java.lang.String, double)

setFloatProperty

public void setFloatProperty(String name,
                             float value)
                      throws JMSException
Throws:
JMSException
See Also:
Message.setFloatProperty(java.lang.String, float)

setIntProperty

public void setIntProperty(String name,
                           int value)
                    throws JMSException
Throws:
JMSException
See Also:
Message.setIntProperty(java.lang.String, int)

setLongProperty

public void setLongProperty(String name,
                            long value)
                     throws JMSException
Throws:
JMSException
See Also:
Message.setLongProperty(java.lang.String, long)

setObjectProperty

public void setObjectProperty(String name,
                              Object value)
                       throws JMSException
Throws:
JMSException
See Also:
Message.setObjectProperty(java.lang.String, java.lang.Object)

setShortProperty

public void setShortProperty(String name,
                             short value)
                      throws JMSException
Throws:
JMSException
See Also:
Message.setShortProperty(java.lang.String, short)

setStringProperty

public void setStringProperty(String name,
                              String value)
                       throws JMSException
Throws:
JMSException
See Also:
Message.setStringProperty(java.lang.String, java.lang.String)

equals

public boolean equals(Object o)
Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)

hashCode

public int hashCode()
Overrides:
hashCode in class Object
See Also:
Object.hashCode()

toString

public String toString()
Overrides:
toString in class Object
See Also:
Object.toString()

setProperties

public void setProperties(HashMap<String,Object> props)
Sets the properties HashMap.

Parameters:
props - the properties HashMap

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Throws:
IOException

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Throws:
IOException
ClassNotFoundException