|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.exolab.jms.message.MessageImpl
This class implements the javax.jms.Message interface.
Message
, Serialized FormField Summary | |
protected long |
_acceptedTime
The time that the message was accepted by the server. |
protected boolean |
_bodyReadOnly
If true, the message body is read-only. |
protected long |
_connectionId
The identity of the connection that this was received on. |
protected boolean |
_processed
This flag indicates that the message has been processed by the provider. |
protected boolean |
_propertiesReadOnly
If true, message properties are read-only. |
protected long |
_sequenceNumber
The sequence number assigned to the message by server when the message is accepted. |
protected static byte[] |
EMPTY
Empty byte array for initialisation purposes. |
Fields inherited from interface javax.jms.Message |
DEFAULT_DELIVERY_MODE, DEFAULT_PRIORITY, DEFAULT_TIME_TO_LIVE |
Constructor Summary | |
MessageImpl()
Default constructor, required to support externalization. |
Method Summary | |
void |
acknowledge()
Acknowledge the message through the session that dispatched it. |
void |
checkPropertyWrite()
|
void |
checkRead()
|
void |
checkWrite()
|
void |
clearBody()
|
void |
clearProperties()
|
java.lang.Object |
clone()
Clone an instance of this object. |
long |
getAcceptedTime()
Return the time that the messages was accepted by the server |
java.lang.String |
getAckMessageID()
Returns the identifier of the message for acknowledgment. |
boolean |
getBooleanProperty(java.lang.String name)
|
byte |
getByteProperty(java.lang.String name)
|
long |
getConnectionId()
Return the id of the connection that this messaged was received on |
long |
getConsumerId()
Returns the value of the consumer identifier |
double |
getDoubleProperty(java.lang.String name)
|
float |
getFloatProperty(java.lang.String name)
|
java.lang.String |
getId()
|
int |
getIntProperty(java.lang.String name)
|
java.lang.String |
getJMSCorrelationID()
|
byte[] |
getJMSCorrelationIDAsBytes()
|
int |
getJMSDeliveryMode()
|
javax.jms.Destination |
getJMSDestination()
|
long |
getJMSExpiration()
|
java.lang.String |
getJMSMessageID()
|
int |
getJMSPriority()
|
boolean |
getJMSRedelivered()
|
javax.jms.Destination |
getJMSReplyTo()
|
long |
getJMSTimestamp()
|
java.lang.String |
getJMSType()
|
long |
getLongProperty(java.lang.String name)
|
MessageId |
getMessageId()
Return the message id |
java.lang.Object |
getObjectProperty(java.lang.String name)
|
boolean |
getProcessed()
Check whether the message has been processed |
java.util.Enumeration |
getPropertyNames()
|
boolean |
getReadOnly()
Get the read-only state of the message. |
long |
getSequenceNumber()
Return the sequence number associated with this message |
short |
getShortProperty(java.lang.String name)
|
java.lang.String |
getStringProperty(java.lang.String name)
|
java.lang.String |
getWildcard()
Return the wildcard value if there is one. |
boolean |
propertyExists(java.lang.String name)
|
void |
readExternal(java.io.ObjectInput in)
|
void |
setAcceptedTime(long time)
Set the time that the message was accepted by the server. |
void |
setBooleanProperty(java.lang.String name,
boolean value)
|
void |
setByteProperty(java.lang.String name,
byte value)
|
void |
setConnectionId(long id)
Set the id of the connection that this message was received on |
void |
setConsumerId(long consumerId)
Set the value of the consumer identifer |
void |
setDoubleProperty(java.lang.String name,
double value)
|
void |
setFloatProperty(java.lang.String name,
float value)
|
void |
setIntProperty(java.lang.String name,
int value)
|
void |
setJMSCorrelationID(java.lang.String correlationID)
|
void |
setJMSCorrelationIDAsBytes(byte[] correlationID)
|
void |
setJMSDeliveryMode(int deliveryMode)
|
void |
setJMSDestination(javax.jms.Destination destination)
|
void |
setJMSExpiration(long expiration)
|
void |
setJMSMessageID(java.lang.String id)
|
void |
setJMSPriority(int priority)
|
void |
setJMSRedelivered(boolean redelivered)
|
void |
setJMSReplyTo(javax.jms.Destination replyTo)
|
void |
setJMSTimestamp(long timestamp)
|
void |
setJMSType(java.lang.String type)
|
void |
setJMSXRcvTimestamp(long timestamp)
Set the JMSXRcvTimestamp property. |
void |
setLongProperty(java.lang.String name,
long value)
|
void |
setObjectProperty(java.lang.String name,
java.lang.Object value)
|
void |
setProcessed(boolean state)
Set the processed state of the message |
void |
setReadOnly(boolean readOnly)
Set the read-only state of the message |
void |
setSequenceNumber(long seq)
Set the sequence number for this message. |
void |
setSession(MessageSessionIfc session)
|
void |
setShortProperty(java.lang.String name,
short value)
|
void |
setStringProperty(java.lang.String name,
java.lang.String value)
|
void |
setWildcard(java.lang.String wildcard)
Set the wildcard string. |
void |
writeExternal(java.io.ObjectOutput out)
|
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected boolean _propertiesReadOnly
protected boolean _bodyReadOnly
protected long _acceptedTime
protected long _sequenceNumber
protected transient long _connectionId
protected boolean _processed
protected static final byte[] EMPTY
Constructor Detail |
public MessageImpl()
Method Detail |
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
- if object or attributesare not
cloneablepublic void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
public void setSession(MessageSessionIfc session)
public java.lang.String getJMSMessageID() throws javax.jms.JMSException
getJMSMessageID
in interface javax.jms.Message
public void setJMSMessageID(java.lang.String id) throws javax.jms.JMSException
setJMSMessageID
in interface javax.jms.Message
public java.lang.String getAckMessageID()
getJMSMessageID()
, unless the message was republished after
its receipt. If the message is republished, this method will return
the original message identifier, whereas getJMSMessageID()
will
return that of the last publication.public long getJMSTimestamp() throws javax.jms.JMSException
getJMSTimestamp
in interface javax.jms.Message
public void setJMSTimestamp(long timestamp) throws javax.jms.JMSException
setJMSTimestamp
in interface javax.jms.Message
public java.lang.String getWildcard()
public MessageId getMessageId()
public void setWildcard(java.lang.String wildcard)
wildcard
- The wildcard.public long getConsumerId()
public void setConsumerId(long consumerId)
consumerId
- the consumer identifierpublic byte[] getJMSCorrelationIDAsBytes() throws javax.jms.JMSException
getJMSCorrelationIDAsBytes
in interface javax.jms.Message
public void setJMSCorrelationIDAsBytes(byte[] correlationID) throws javax.jms.JMSException
setJMSCorrelationIDAsBytes
in interface javax.jms.Message
public void setJMSCorrelationID(java.lang.String correlationID) throws javax.jms.JMSException
setJMSCorrelationID
in interface javax.jms.Message
public java.lang.String getJMSCorrelationID() throws javax.jms.JMSException
getJMSCorrelationID
in interface javax.jms.Message
public javax.jms.Destination getJMSReplyTo() throws javax.jms.JMSException
getJMSReplyTo
in interface javax.jms.Message
public void setJMSReplyTo(javax.jms.Destination replyTo) throws javax.jms.JMSException
setJMSReplyTo
in interface javax.jms.Message
public javax.jms.Destination getJMSDestination() throws javax.jms.JMSException
getJMSDestination
in interface javax.jms.Message
public void setJMSDestination(javax.jms.Destination destination) throws javax.jms.JMSException
setJMSDestination
in interface javax.jms.Message
public int getJMSDeliveryMode() throws javax.jms.JMSException
getJMSDeliveryMode
in interface javax.jms.Message
public void setJMSDeliveryMode(int deliveryMode) throws javax.jms.JMSException
setJMSDeliveryMode
in interface javax.jms.Message
public boolean getJMSRedelivered() throws javax.jms.JMSException
getJMSRedelivered
in interface javax.jms.Message
public void setJMSRedelivered(boolean redelivered) throws javax.jms.JMSException
setJMSRedelivered
in interface javax.jms.Message
public java.lang.String getJMSType() throws javax.jms.JMSException
getJMSType
in interface javax.jms.Message
public void setJMSType(java.lang.String type) throws javax.jms.JMSException
setJMSType
in interface javax.jms.Message
public long getJMSExpiration() throws javax.jms.JMSException
getJMSExpiration
in interface javax.jms.Message
public void setJMSExpiration(long expiration) throws javax.jms.JMSException
setJMSExpiration
in interface javax.jms.Message
public int getJMSPriority() throws javax.jms.JMSException
getJMSPriority
in interface javax.jms.Message
public void setJMSPriority(int priority) throws javax.jms.JMSException
setJMSPriority
in interface javax.jms.Message
public void clearProperties() throws javax.jms.JMSException
clearProperties
in interface javax.jms.Message
public boolean propertyExists(java.lang.String name) throws javax.jms.JMSException
propertyExists
in interface javax.jms.Message
public boolean getBooleanProperty(java.lang.String name) throws javax.jms.JMSException
getBooleanProperty
in interface javax.jms.Message
public byte getByteProperty(java.lang.String name) throws javax.jms.JMSException
getByteProperty
in interface javax.jms.Message
public short getShortProperty(java.lang.String name) throws javax.jms.JMSException
getShortProperty
in interface javax.jms.Message
public int getIntProperty(java.lang.String name) throws javax.jms.JMSException
getIntProperty
in interface javax.jms.Message
public long getLongProperty(java.lang.String name) throws javax.jms.JMSException
getLongProperty
in interface javax.jms.Message
public float getFloatProperty(java.lang.String name) throws javax.jms.JMSException
getFloatProperty
in interface javax.jms.Message
public double getDoubleProperty(java.lang.String name) throws javax.jms.JMSException
getDoubleProperty
in interface javax.jms.Message
public java.lang.String getStringProperty(java.lang.String name) throws javax.jms.JMSException
getStringProperty
in interface javax.jms.Message
public java.lang.Object getObjectProperty(java.lang.String name) throws javax.jms.JMSException
getObjectProperty
in interface javax.jms.Message
public java.util.Enumeration getPropertyNames() throws javax.jms.JMSException
getPropertyNames
in interface javax.jms.Message
public void setBooleanProperty(java.lang.String name, boolean value) throws javax.jms.JMSException
setBooleanProperty
in interface javax.jms.Message
public void setByteProperty(java.lang.String name, byte value) throws javax.jms.JMSException
setByteProperty
in interface javax.jms.Message
public void setShortProperty(java.lang.String name, short value) throws javax.jms.JMSException
setShortProperty
in interface javax.jms.Message
public void setIntProperty(java.lang.String name, int value) throws javax.jms.JMSException
setIntProperty
in interface javax.jms.Message
public void setLongProperty(java.lang.String name, long value) throws javax.jms.JMSException
setLongProperty
in interface javax.jms.Message
public void setFloatProperty(java.lang.String name, float value) throws javax.jms.JMSException
setFloatProperty
in interface javax.jms.Message
public void setDoubleProperty(java.lang.String name, double value) throws javax.jms.JMSException
setDoubleProperty
in interface javax.jms.Message
public void setStringProperty(java.lang.String name, java.lang.String value) throws javax.jms.JMSException
setStringProperty
in interface javax.jms.Message
public void setObjectProperty(java.lang.String name, java.lang.Object value) throws javax.jms.JMSException
setObjectProperty
in interface javax.jms.Message
public void acknowledge() throws javax.jms.JMSException
acknowledge
in interface javax.jms.Message
javax.jms.JMSException
- if acknowledgement failspublic void clearBody() throws javax.jms.JMSException
clearBody
in interface javax.jms.Message
public final void checkPropertyWrite() throws javax.jms.MessageNotWriteableException
public final void checkWrite() throws javax.jms.MessageNotWriteableException
public final void checkRead() throws javax.jms.MessageNotReadableException
public java.lang.String getId()
public void setAcceptedTime(long time)
time
- the time that the message was accepted by the serverpublic long getAcceptedTime()
public void setSequenceNumber(long seq)
seq
- the sequence number, which is used for orderingpublic long getSequenceNumber()
public void setConnectionId(long id)
id
- the connection idpublic long getConnectionId()
public void setProcessed(boolean state)
state
- true if message has been processed by providerpublic boolean getProcessed()
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 changedpublic final boolean getReadOnly()
public void setJMSXRcvTimestamp(long timestamp)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |