|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
jrun.jms.core.message.MessageImpl
This class implements the javax.jms.Message interface
Message, Serialized Form| Field Summary | |
protected long |
_acceptedTime
This is the time that the message was accepted by the server |
protected boolean |
_bodyReadOnly
If true, the message body is read-only |
protected int |
_connectionId
This message was received on this connection |
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
This is the sequence number assigned to it by the message manager when the message is accepted. |
protected int |
_size
Holds the size (in bytes). |
| Constructor Summary | |
MessageImpl()
Default constructor, required to support externalization |
|
| Method Summary | |
void |
acknowledge()
Acknowledge the message through the session that dispatched it. |
boolean |
canDispose()
Check whether we can dispose of this object. |
void |
checkPropertyWrite()
|
void |
checkRead()
|
void |
checkWrite()
|
void |
clearBody()
|
void |
clearProperties()
|
java.lang.Object |
clone()
Clone an instance of this object |
void |
dispose()
Unconditionally dispose of this object or do whatever you can to make it available for garbage collection |
long |
getAcceptedTime()
Return the time that the messages was accepted by the server |
boolean |
getBooleanProperty(java.lang.String name)
|
byte |
getByteProperty(java.lang.String name)
|
long |
getClientId()
Get the value of the client session consumer identifier |
int |
getConnectionId()
Return the id of the connection that this messaged was received on |
java.lang.String |
getConsumerId()
Get the value of consumerId |
double |
getDoubleProperty(java.lang.String name)
|
static int |
getExternalizableObjectSize(java.io.Externalizable obj)
Calculate the size of the supplied message object. |
float |
getFloatProperty(java.lang.String name)
|
long |
getId()
Return the identity of the object as a long |
java.lang.String |
getIdAsString()
Return the identity of the object as a string |
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)
|
long |
getPersistentId()
Return the message's persistent identity or null if it is not set |
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)
|
int |
getSize()
Return the previously saved size value (if any.) |
java.lang.String |
getStringProperty(java.lang.String name)
|
java.lang.String |
getWildcard()
Return the wildcard value if there is one. |
boolean |
isPersistent()
|
boolean |
isPriorityExpedited()
|
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 |
setClientId(long clientId)
Set the value of the client session consumer identifer |
void |
setConnectionId(int id)
Set the id of the connection that this message was received on |
void |
setConsumerId(java.lang.String consumerId)
Set the value of consumerId |
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 |
setSize(int size)
Store the size in bytes of this message. |
void |
setStringProperty(java.lang.String name,
java.lang.String value)
|
void |
setWildcard(java.lang.String wildcard)
Set the wildcard string. |
boolean |
tryDisposing()
Check to see if this object can be disposed. |
void |
writeExternal(java.io.ObjectOutput out)
|
| Field Detail |
protected boolean _propertiesReadOnly
protected boolean _bodyReadOnly
protected long _acceptedTime
protected long _sequenceNumber
protected transient int _connectionId
protected boolean _processed
protected int _size
| Constructor Detail |
public MessageImpl()
throws javax.jms.JMSException
| Method Detail |
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
java.lang.CloneNotSupportedException - if object or attributesare not
cloneable
public 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.Externalizablepublic void setSession(MessageSessionIfc session)
public java.lang.String getJMSMessageID()
throws javax.jms.JMSException
public void setJMSMessageID(java.lang.String id)
throws javax.jms.JMSException
public long getJMSTimestamp()
throws javax.jms.JMSException
public void setJMSTimestamp(long timestamp)
throws javax.jms.JMSException
public java.lang.String getWildcard()
public MessageId getMessageId()
public void setWildcard(java.lang.String wildcard)
wildcard - The wildcard.public java.lang.String getConsumerId()
public void setConsumerId(java.lang.String consumerId)
consumerId - the consumerIdpublic long getClientId()
public void setClientId(long clientId)
clientId - the client session consumer identifier
public byte[] getJMSCorrelationIDAsBytes()
throws javax.jms.JMSException
public void setJMSCorrelationIDAsBytes(byte[] correlationID)
throws javax.jms.JMSException
public void setJMSCorrelationID(java.lang.String correlationID)
throws javax.jms.JMSException
public java.lang.String getJMSCorrelationID()
throws javax.jms.JMSException
public javax.jms.Destination getJMSReplyTo()
throws javax.jms.JMSException
public void setJMSReplyTo(javax.jms.Destination replyTo)
throws javax.jms.JMSException
public javax.jms.Destination getJMSDestination()
throws javax.jms.JMSException
public void setJMSDestination(javax.jms.Destination destination)
throws javax.jms.JMSException
public int getJMSDeliveryMode()
throws javax.jms.JMSException
public void setJMSDeliveryMode(int deliveryMode)
throws javax.jms.JMSException
public boolean getJMSRedelivered()
throws javax.jms.JMSException
public void setJMSRedelivered(boolean redelivered)
throws javax.jms.JMSException
public java.lang.String getJMSType()
throws javax.jms.JMSException
public void setJMSType(java.lang.String type)
throws javax.jms.JMSException
public long getJMSExpiration()
throws javax.jms.JMSException
public void setJMSExpiration(long expiration)
throws javax.jms.JMSException
public int getJMSPriority()
throws javax.jms.JMSException
public void setJMSPriority(int priority)
throws javax.jms.JMSException
public boolean isPersistent()
throws javax.jms.JMSException
public boolean isPriorityExpedited()
throws javax.jms.JMSException
public void clearProperties()
throws javax.jms.JMSException
public boolean propertyExists(java.lang.String name)
throws javax.jms.JMSException
public boolean getBooleanProperty(java.lang.String name)
throws javax.jms.JMSException
public byte getByteProperty(java.lang.String name)
throws javax.jms.JMSException
public short getShortProperty(java.lang.String name)
throws javax.jms.JMSException
public int getIntProperty(java.lang.String name)
throws javax.jms.JMSException
public long getLongProperty(java.lang.String name)
throws javax.jms.JMSException
public float getFloatProperty(java.lang.String name)
throws javax.jms.JMSException
public double getDoubleProperty(java.lang.String name)
throws javax.jms.JMSException
public java.lang.String getStringProperty(java.lang.String name)
throws javax.jms.JMSException
public java.lang.Object getObjectProperty(java.lang.String name)
throws javax.jms.JMSException
public java.util.Enumeration getPropertyNames()
throws javax.jms.JMSException
public void setBooleanProperty(java.lang.String name,
boolean value)
throws javax.jms.JMSException
public void setByteProperty(java.lang.String name,
byte value)
throws javax.jms.JMSException
public void setShortProperty(java.lang.String name,
short value)
throws javax.jms.JMSException
public void setIntProperty(java.lang.String name,
int value)
throws javax.jms.JMSException
public void setLongProperty(java.lang.String name,
long value)
throws javax.jms.JMSException
public void setFloatProperty(java.lang.String name,
float value)
throws javax.jms.JMSException
public void setDoubleProperty(java.lang.String name,
double value)
throws javax.jms.JMSException
public void setStringProperty(java.lang.String name,
java.lang.String value)
throws javax.jms.JMSException
public void setObjectProperty(java.lang.String name,
java.lang.Object value)
throws javax.jms.JMSException
public void acknowledge()
throws javax.jms.JMSException
JMSException -
public void clearBody()
throws javax.jms.JMSException
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 long getId()
IdentifiablegetId in interface Identifiablejrun.jms.core.Identifiablepublic java.lang.String getIdAsString()
IdentifiablegetIdAsString in interface Identifiablejrun.jms.core.Identifiablepublic boolean tryDisposing()
DisposabletryDisposing in interface Disposablejrun.jms.core.Disposablepublic final boolean canDispose()
DisposableDisposable.dispose() method does a
check before disposing of the objectcanDispose in interface Disposablejrun.jms.core.Disposablepublic void dispose()
Disposabledispose in interface Disposable
public long getPersistentId()
throws javax.jms.JMSException
JMSException - if cannot get persistent identitypublic 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(int id)
id - the connection idpublic int 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-onlyJMSException - if the read-only state cannot be changedpublic final boolean getReadOnly()
public void setJMSXRcvTimestamp(long timestamp)
public static int getExternalizableObjectSize(java.io.Externalizable obj)
public void setSize(int size)
public int getSize()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||