|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object
|
+--org.exolab.core.foundation.PersistentObject
|
+--org.exolab.jms.messagemgr.PersistentMessageHandle
A persistent message handle extends MessageHandle and references a
persistent message. These messages can be discarded from the cache and later
faulted in through the 'resolve' method.
| Constructor Summary | |
PersistentMessageHandle()
Default constructor |
|
PersistentMessageHandle(MessageImpl message)
Create a persistent handle from a message |
|
| Method Summary | |
void |
clear()
Override the behaviour of the base class. |
java.lang.Object |
clone()
Clone the persistent message handle object |
void |
destroy()
Destroy this handle |
boolean |
equals(java.lang.Object object)
|
long |
getAcceptedTime()
Return the time that the message was accepted by the server |
long |
getClientId()
Retrieve the client identity associated with this handle |
java.lang.String |
getConsumerName()
Return the consumer namne |
boolean |
getDelivered()
Return the delivered state of the message |
JmsDestination |
getDestination()
Return the destination for this handle |
long |
getExpiryTime()
Return the message expiry time |
MessageImpl |
getMessage()
Return the associated message or null if it is invalid |
MessageId |
getMessageId()
Return the identity of the underlying message |
int |
getPriority()
Return the priority of the corresponding message |
long |
getSequenceNumber()
Return message's sequence number |
boolean |
hasExpired()
Determines if the message has expired |
int |
hashCode()
|
boolean |
isPersistent()
Check whether the the DeliveryMode of the underlying message
is PERSISTENT |
void |
readExternal(java.io.ObjectInput stream)
|
void |
setAcceptedTime(long time)
Set the time that the message was accepted by the server |
void |
setClientId(long clientId)
Set the client id, that owns this handle |
void |
setConsumerName(java.lang.String name)
Set the consumer endpoint that owns this handle. |
void |
setDelivered()
This is used to set the message as delivered. |
void |
setDelivered(boolean value)
Set the delivered flag for the underlying message. |
void |
setDestination(JmsDestination destination)
Set the destination that owns this handle |
void |
setExpiryTime(long time)
Set the message expiry time |
void |
setMessageId(MessageId id)
Set the identity of the underlying message |
void |
setPriority(int priority)
Set the messagee priority |
void |
setSequenceNumber(long seq)
Set the message's sequence number |
java.lang.String |
toString()
|
void |
writeExternal(java.io.ObjectOutput stream)
|
| Methods inherited from class org.exolab.core.foundation.PersistentObject |
getId, getMinimumObjectSize, getObjectId, getObjectVersion, getVersion, setId, setMinimumObjectSize, setObjectId, setObjectVersion, setVersion |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public PersistentMessageHandle()
public PersistentMessageHandle(MessageImpl message)
throws javax.jms.JMSException
message - - persistent messagejavax.jms.JMSException - - if the object cannot be constructed| Method Detail |
public void setMessageId(MessageId id)
id - - the message idpublic MessageId getMessageId()
getMessageId in interface MessageHandlepublic MessageImpl getMessage()
getMessage in interface MessageHandlepublic void setPriority(int priority)
setPriority in interface MessageHandleid - the persistent idpublic int getPriority()
getPriority in interface MessageHandlepublic void setDelivered(boolean value)
setDelivered in interface MessageHandlevalue - - true if deliveredpublic boolean getDelivered()
getDelivered in interface MessageHandlepublic void setAcceptedTime(long time)
setAcceptedTime in interface MessageHandlelong - - time since epochpublic long getAcceptedTime()
getAcceptedTime in interface MessageHandlepublic void setSequenceNumber(long seq)
setSequenceNumber in interface MessageHandleseq - - sequence timepublic long getSequenceNumber()
getSequenceNumber in interface MessageHandlepublic void setExpiryTime(long time)
setExpiryTime in interface MessageHandleorg.exolab.jms.message.MessageHandletime - - time that it was set in mspublic long getExpiryTime()
getExpiryTime in interface MessageHandlepublic boolean hasExpired()
true if the message has expired, otherwise
falsepublic void setConsumerName(java.lang.String name)
MessageHandlesetConsumerName in interface MessageHandleorg.exolab.jms.message.MessageHandlename - - consumer namepublic java.lang.String getConsumerName()
MessageHandlegetConsumerName in interface MessageHandleorg.exolab.jms.message.MessageHandlepublic boolean isPersistent()
MessageHandleDeliveryMode of the underlying message
is PERSISTENTisPersistent in interface MessageHandlepublic void setDestination(JmsDestination destination)
setDestination in interface MessageHandledestination - - the destinationpublic JmsDestination getDestination()
getDestination in interface MessageHandlepublic void setClientId(long clientId)
setClientId in interface MessageHandleclientId - - client identitypublic long getClientId()
getClientId in interface MessageHandlepublic void clear()
clear in interface MessageHandlepublic void destroy()
destroy in interface MessageHandle
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class org.exolab.core.foundation.PersistentObjectjava.lang.CloneNotSupportedException - public boolean equals(java.lang.Object object)
equals in class org.exolab.core.foundation.PersistentObjectpublic java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic void setDelivered()
We do not really throw an exception here....and it seems that this is a very fine grained approach to dealing with this...basically translates to a transaction for every message.
setDelivered in interface MessageHandle
public void writeExternal(java.io.ObjectOutput stream)
throws java.io.IOException
writeExternal in interface java.io.ExternalizablewriteExternal in class org.exolab.core.foundation.PersistentObject
public void readExternal(java.io.ObjectInput stream)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.ExternalizablereadExternal in class org.exolab.core.foundation.PersistentObject
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||