| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--org.exolab.jms.messagemgr.AbstractMessageHandle
Abstract implementation of the MessageHandle interface.
| Constructor Summary | |
| AbstractMessageHandle(DestinationCache cache,
                      MessageRef reference,
                      MessageImpl message)Construct a new AbstractMessageHandle. | |
| AbstractMessageHandle(java.lang.String messageId,
                      int priority,
                      long acceptedTime,
                      long sequenceNumber,
                      long expiryTime,
                      JmsDestination destination)Construct a new AbstractMessageHandle. | |
| Method Summary | |
|  void | destroy()Destroy this handle. | 
|  boolean | equals(java.lang.Object object)Indicates whether some other object is "equal to" this one. | 
|  long | getAcceptedTime()Returns the time that the corresponding message was accepted, in milliseconds. | 
|  long | getConnectionId()Returns the connection identity associated with this handle. | 
|  long | getConsumerId()Returns the consumer identity associated with the message. | 
|  java.lang.String | getConsumerPersistentId()Returns the persistent identity of the the consumer endpoint that owns this handle. | 
|  boolean | getDelivered()Returns if an attempt has already been made to deliver the message. | 
|  JmsDestination | getDestination()Returns the message destination. | 
|  long | getExpiryTime()Returns the time that the message expires. | 
|  MessageImpl | getMessage()Returns the message associated with this handle. | 
|  java.lang.String | getMessageId()Returns the message identifier. | 
|  MessageRef | getMessageRef()Returns the message reference. | 
|  int | getPriority()Returns the priority of the message. | 
|  long | getSequenceNumber()Returns the handle's sequence number. | 
|  boolean | hasExpired()Determines if the message has expired. | 
|  int | hashCode()Returns a hash code value for the object. | 
|  boolean | isPersistent()Determines if the handle is persistent. | 
|  void | release()Release the message handle back to the cache, to recover an unsent or unacknowledged message. | 
| protected  void | release(MessageHandle handle)Release the message handle back to the cache, to recover an unsent or unacknowledged message. | 
|  void | setDelivered(boolean delivered)Indicates if a message has been delivered to a MessageConsumer,
 but not acknowledged. | 
| protected  void | setDestinationCache(DestinationCache cache)Sets the destination cache. | 
| protected  void | setMessageRef(MessageRef reference)Sets the message reference. | 
|  java.lang.String | toString()Return a stringified version of the handle. | 
| Methods inherited from class java.lang.Object | 
| clone, finalize, getClass, notify, notifyAll, wait, wait, wait | 
| Methods inherited from interface org.exolab.jms.messagemgr.MessageHandle | 
| add, update | 
| Constructor Detail | 
public AbstractMessageHandle(DestinationCache cache,
                             MessageRef reference,
                             MessageImpl message)
                      throws javax.jms.JMSException
AbstractMessageHandle.cache - the destination cache that owns thisreference - the reference to the messagemessage - the message for which the handle is createdjavax.jms.JMSException - if the handle cannot be constructed
public AbstractMessageHandle(java.lang.String messageId,
                             int priority,
                             long acceptedTime,
                             long sequenceNumber,
                             long expiryTime,
                             JmsDestination destination)
AbstractMessageHandle.messageId - the message identifierpriority - the message priorityacceptedTime - the time the message was accepted by the serversequenceNumber - the message sequence numberexpiryTime - the time that the message will expire| Method Detail | 
public java.lang.String getMessageId()
getMessageId in interface MessageHandle
public MessageImpl getMessage()
                       throws javax.jms.JMSException
getMessage in interface MessageHandlenull if the handle is no
         longer validjavax.jms.JMSException - for any errorpublic void setDelivered(boolean delivered)
MessageConsumer,
 but not acknowledged.setDelivered in interface MessageHandledelivered - if true indicates that an attempt has been
                  made to deliver the messagepublic boolean getDelivered()
getDelivered in interface MessageHandletrue if delivery has been attemptedpublic int getPriority()
getPriority in interface MessageHandlepublic long getAcceptedTime()
getAcceptedTime in interface MessageHandlepublic long getExpiryTime()
getExpiryTime in interface MessageHandlepublic boolean hasExpired()
hasExpired in interface MessageHandletrue if the message has expired, otherwise
         falsepublic long getSequenceNumber()
getSequenceNumber in interface MessageHandlepublic JmsDestination getDestination()
getDestination in interface MessageHandlepublic long getConsumerId()
getConsumerId in interface MessageHandle-1 if the message isn't associated with a consumerpublic java.lang.String getConsumerPersistentId()
getConsumerPersistentId in interface MessageHandlenullpublic long getConnectionId()
getConnectionId in interface MessageHandle-1 if this isn't associated with a connectionpublic boolean isPersistent()
isPersistent in interface MessageHandlefalsepublic boolean equals(java.lang.Object object)
equals in class java.lang.Objectobject - the reference object with which to compare.true if object is a MessageHandle, and
         has the same #getMessageId()public int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object
public void destroy()
             throws javax.jms.JMSException
destroy in interface MessageHandlejavax.jms.JMSException - for any error
public void release()
             throws javax.jms.JMSException
release in interface MessageHandlejavax.jms.JMSException - for any errorpublic MessageRef getMessageRef()
getMessageRef in interface MessageHandlenull if none has been setprotected void setMessageRef(MessageRef reference)
reference - the reference to the messageprotected void setDestinationCache(DestinationCache cache)
cache - the destination cache
protected void release(MessageHandle handle)
                throws javax.jms.JMSException
handle - the handle to releasejavax.jms.JMSException - for any error| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||