|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.exolab.jmscts.jms.message.BasicMessage
This class provides a basic implementation of the javax.jms.Message interface.
Message
Fields inherited from interface javax.jms.Message |
DEFAULT_DELIVERY_MODE, DEFAULT_PRIORITY, DEFAULT_TIME_TO_LIVE |
Constructor Summary | |
BasicMessage()
Construct a new BasicMessage |
Method Summary | |
void |
acknowledge()
No-op. |
protected void |
checkPropertyWrite()
Determines if properties may be set |
protected void |
checkRead()
Determines if the message body may be read |
protected void |
checkWrite()
Determines if the message body may be written |
void |
clearBody()
Clear the message body |
void |
clearProperties()
Clear the message properties |
protected boolean |
getBodyReadOnly()
Determines if the message body is read only |
boolean |
getBooleanProperty(java.lang.String name)
Returns the boolean property value with the give name |
byte |
getByteProperty(java.lang.String name)
Returns the byte property value with the give name |
double |
getDoubleProperty(java.lang.String name)
Returns the double property value with the give name |
float |
getFloatProperty(java.lang.String name)
Returns the float property value with the give name |
int |
getIntProperty(java.lang.String name)
Returns the int property value with the give name |
java.lang.String |
getJMSCorrelationID()
Get the correlation ID for the message |
byte[] |
getJMSCorrelationIDAsBytes()
Get the correlation ID as an array of bytes |
int |
getJMSDeliveryMode()
Get the message delivery mode |
javax.jms.Destination |
getJMSDestination()
Get the message destination |
long |
getJMSExpiration()
Get the message's expiration value |
java.lang.String |
getJMSMessageID()
Get the message ID |
int |
getJMSPriority()
Get the message priority |
boolean |
getJMSRedelivered()
Determine if the message is being delivered |
javax.jms.Destination |
getJMSReplyTo()
Get the reply-to destination |
long |
getJMSTimestamp()
Get the message timestamp |
java.lang.String |
getJMSType()
Get the message type |
long |
getLongProperty(java.lang.String name)
Returns the long property value with the give name |
java.lang.Object |
getObjectProperty(java.lang.String name)
Returns the Object property value with the give name |
protected boolean |
getPropertiesReadOnly()
Determines if the message properties are read only |
java.util.Enumeration |
getPropertyNames()
Return an enumeration of all the property names |
short |
getShortProperty(java.lang.String name)
Returns the short property value with the give name |
java.lang.String |
getStringProperty(java.lang.String name)
Returns the String property value with the give name |
boolean |
propertyExists(java.lang.String name)
Determines if a property exists |
protected void |
setBodyReadOnly(boolean readOnly)
Sets the read-only state of the message body |
void |
setBooleanProperty(java.lang.String name,
boolean value)
Set a boolean property value with the given name |
void |
setByteProperty(java.lang.String name,
byte value)
Set a byte property value with the given name |
void |
setDoubleProperty(java.lang.String name,
double value)
Set a double property value with the given name |
void |
setFloatProperty(java.lang.String name,
float value)
Set a float property value with the given name |
void |
setIntProperty(java.lang.String name,
int value)
Set an int property value with the given name |
void |
setJMSCorrelationID(java.lang.String correlationID)
Set the correlation ID |
void |
setJMSCorrelationIDAsBytes(byte[] correlationID)
Set the correlation ID as an array of bytes |
void |
setJMSDeliveryMode(int deliveryMode)
Set the message delivery mode |
void |
setJMSDestination(javax.jms.Destination destination)
Set the message destination |
void |
setJMSExpiration(long expiration)
Set the message's expiration value |
void |
setJMSMessageID(java.lang.String messageID)
Set the message ID |
void |
setJMSPriority(int priority)
Set the message priority |
void |
setJMSRedelivered(boolean redelivered)
Set to indicate if the message is being redelivered |
void |
setJMSReplyTo(javax.jms.Destination replyTo)
Set the reply-to destination |
void |
setJMSTimestamp(long timestamp)
Set the message timetamp |
void |
setJMSType(java.lang.String type)
Set the message type |
void |
setLongProperty(java.lang.String name,
long value)
Set a long property value with the given name |
void |
setObjectProperty(java.lang.String name,
java.lang.Object value)
Set an Object property value with the given name |
protected void |
setPropertiesReadOnly(boolean readOnly)
Sets the read-only state of the message properties |
void |
setReadOnly(boolean readOnly)
Sets the read-only state of the message |
void |
setShortProperty(java.lang.String name,
short value)
Set a short property value with the given name |
void |
setStringProperty(java.lang.String name,
java.lang.String value)
Set a String property value with the given name |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public BasicMessage()
BasicMessage
Method Detail |
public void acknowledge()
acknowledge
in interface javax.jms.Message
public void clearBody() throws javax.jms.JMSException
clearBody
in interface javax.jms.Message
javax.jms.JMSException
- for any errorpublic void clearProperties()
clearProperties
in interface javax.jms.Message
public java.lang.String getJMSMessageID()
getJMSMessageID
in interface javax.jms.Message
public void setJMSMessageID(java.lang.String messageID)
setJMSMessageID
in interface javax.jms.Message
messageID
- the message IDpublic java.lang.String getJMSType()
getJMSType
in interface javax.jms.Message
public void setJMSType(java.lang.String type)
setJMSType
in interface javax.jms.Message
type
- the message typepublic long getJMSTimestamp()
getJMSTimestamp
in interface javax.jms.Message
public void setJMSTimestamp(long timestamp)
setJMSTimestamp
in interface javax.jms.Message
timestamp
- the message timestamppublic java.lang.String getJMSCorrelationID()
getJMSCorrelationID
in interface javax.jms.Message
public void setJMSCorrelationID(java.lang.String correlationID)
setJMSCorrelationID
in interface javax.jms.Message
correlationID
- the correlation IDpublic byte[] getJMSCorrelationIDAsBytes()
getJMSCorrelationIDAsBytes
in interface javax.jms.Message
public void setJMSCorrelationIDAsBytes(byte[] correlationID)
setJMSCorrelationIDAsBytes
in interface javax.jms.Message
correlationID
- the correlation ID as an array of bytespublic javax.jms.Destination getJMSDestination()
getJMSDestination
in interface javax.jms.Message
public void setJMSDestination(javax.jms.Destination destination)
setJMSDestination
in interface javax.jms.Message
destination
- the message destinationpublic javax.jms.Destination getJMSReplyTo()
getJMSReplyTo
in interface javax.jms.Message
public void setJMSReplyTo(javax.jms.Destination replyTo)
setJMSReplyTo
in interface javax.jms.Message
replyTo
- the reply-to destinationpublic int getJMSDeliveryMode()
getJMSDeliveryMode
in interface javax.jms.Message
public void setJMSDeliveryMode(int deliveryMode)
setJMSDeliveryMode
in interface javax.jms.Message
deliveryMode
- the message delivery modepublic long getJMSExpiration()
getJMSExpiration
in interface javax.jms.Message
public void setJMSExpiration(long expiration)
setJMSExpiration
in interface javax.jms.Message
expiration
- the message's expiration valuepublic int getJMSPriority()
getJMSPriority
in interface javax.jms.Message
public void setJMSPriority(int priority)
setJMSPriority
in interface javax.jms.Message
priority
- the message prioritypublic boolean getJMSRedelivered()
getJMSRedelivered
in interface javax.jms.Message
true
if the message is being deliveredpublic void setJMSRedelivered(boolean redelivered)
setJMSRedelivered
in interface javax.jms.Message
redelivered
- if true
indicates the message is being
deliveredpublic boolean propertyExists(java.lang.String name)
propertyExists
in interface javax.jms.Message
name
- the property nametrue
if the property existspublic boolean getBooleanProperty(java.lang.String name) throws javax.jms.MessageFormatException
getBooleanProperty
in interface javax.jms.Message
name
- the name of the boolean propertyjavax.jms.MessageFormatException
- if the type conversion is invalidpublic void setBooleanProperty(java.lang.String name, boolean value)
setBooleanProperty
in interface javax.jms.Message
name
- the name of the boolean propertyvalue
- the boolean property valuepublic byte getByteProperty(java.lang.String name) throws javax.jms.MessageFormatException
getByteProperty
in interface javax.jms.Message
name
- the name of the byte propertyjavax.jms.MessageFormatException
- if the type conversion is invalidpublic void setByteProperty(java.lang.String name, byte value)
setByteProperty
in interface javax.jms.Message
name
- the name of the byte propertyvalue
- the byte property valuepublic short getShortProperty(java.lang.String name) throws javax.jms.MessageFormatException
getShortProperty
in interface javax.jms.Message
name
- the name of the short propertyjavax.jms.MessageFormatException
- if the type conversion is invalidpublic void setShortProperty(java.lang.String name, short value)
setShortProperty
in interface javax.jms.Message
name
- the name of the short propertyvalue
- the short property valuepublic int getIntProperty(java.lang.String name) throws javax.jms.MessageFormatException
getIntProperty
in interface javax.jms.Message
name
- the name of the int propertyjavax.jms.MessageFormatException
- if the type conversion is invalidpublic void setIntProperty(java.lang.String name, int value)
setIntProperty
in interface javax.jms.Message
name
- the name of the int propertyvalue
- the int property valuepublic long getLongProperty(java.lang.String name) throws javax.jms.MessageFormatException
getLongProperty
in interface javax.jms.Message
name
- the name of the long propertyjavax.jms.MessageFormatException
- if the type conversion is invalidpublic void setLongProperty(java.lang.String name, long value)
setLongProperty
in interface javax.jms.Message
name
- the name of the long propertyvalue
- the long property valuepublic float getFloatProperty(java.lang.String name) throws javax.jms.MessageFormatException
getFloatProperty
in interface javax.jms.Message
name
- the name of the float propertyjavax.jms.MessageFormatException
- if the type conversion is invalidpublic void setFloatProperty(java.lang.String name, float value)
setFloatProperty
in interface javax.jms.Message
name
- the name of the float propertyvalue
- the float property valuepublic double getDoubleProperty(java.lang.String name) throws javax.jms.MessageFormatException
getDoubleProperty
in interface javax.jms.Message
name
- the name of the double propertyjavax.jms.MessageFormatException
- if the type conversion is invalidpublic void setDoubleProperty(java.lang.String name, double value)
setDoubleProperty
in interface javax.jms.Message
name
- the name of the double propertyvalue
- the double property valuepublic java.lang.String getStringProperty(java.lang.String name) throws javax.jms.MessageFormatException
getStringProperty
in interface javax.jms.Message
name
- the name of the String propertyjavax.jms.MessageFormatException
- if the type conversion is invalidpublic void setStringProperty(java.lang.String name, java.lang.String value)
setStringProperty
in interface javax.jms.Message
name
- the name of the String propertyvalue
- the String property valuepublic java.lang.Object getObjectProperty(java.lang.String name)
getObjectProperty
in interface javax.jms.Message
name
- the name of the Object propertypublic void setObjectProperty(java.lang.String name, java.lang.Object value)
setObjectProperty
in interface javax.jms.Message
name
- the name of the Object propertyvalue
- the Object property valuepublic java.util.Enumeration getPropertyNames()
getPropertyNames
in interface javax.jms.Message
public void setReadOnly(boolean readOnly) throws javax.jms.JMSException
readOnly
- if true, make the message body and properties read-onlyjavax.jms.JMSException
- if the read-only state cannot be changedprotected boolean getPropertiesReadOnly()
true
if the message properties are read onlyprotected void setPropertiesReadOnly(boolean readOnly)
readOnly
- if true
, make the message properties
read-onlyprotected boolean getBodyReadOnly()
true
if the message body is read onlyprotected void setBodyReadOnly(boolean readOnly)
readOnly
- if true
, make the message bodyprotected void checkPropertyWrite() throws javax.jms.MessageNotWriteableException
javax.jms.MessageNotWriteableException
- if message is read-onlyprotected void checkWrite() throws javax.jms.MessageNotWriteableException
javax.jms.MessageNotWriteableException
- if the message is read-onlyprotected void checkRead() throws javax.jms.MessageNotReadableException
javax.jms.MessageNotReadableException
- if the message is write-only
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |