public abstract class AbstractDestination<E> extends java.util.AbstractQueue<E> implements Destination, java.util.concurrent.BlockingQueue<E>, java.io.Serializable, HandleAware
Modifier | Constructor and Description |
---|---|
protected |
AbstractDestination() |
Modifier and Type | Method and Description |
---|---|
void |
acknowledge(java.lang.String msgId)
Acknowledge receipt of the message.
|
void |
close() |
java.lang.String |
generateMessageID()
Creates a new random message identifier.
|
protected void |
generateMessageID(java.lang.StringBuilder cb)
Customization of the message id for different queue/topics
|
Destination |
getJMSDestination() |
java.lang.String |
getName() |
java.lang.String |
getQueueName() |
java.lang.String |
getTopicName() |
java.lang.String |
getUrl()
Returns a descriptive URL for the queue.
|
boolean |
hasMessage()
Returns true if the queue has at least one message available
|
void |
rollback(java.lang.String msgId)
Rollback the message read.
|
void |
send(java.lang.String msgId,
E msg,
int priority,
long expires,
java.lang.String publisherId)
Sends a message to the queue
|
void |
setName(java.lang.String name)
Sets the name of the destination
|
void |
setSerializationHandle(java.lang.Object handle)
Serialization callback from Resin-IoC to set the handle
|
java.lang.String |
toString() |
contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
add, contains, drainTo, drainTo, offer, offer, poll, put, remainingCapacity, remove, take
@Configurable public void setName(java.lang.String name)
public java.lang.String getName()
public java.lang.String getQueueName()
public java.lang.String getTopicName()
public void setSerializationHandle(java.lang.Object handle)
setSerializationHandle
in interface HandleAware
public java.lang.String getUrl()
public final java.lang.String generateMessageID()
protected void generateMessageID(java.lang.StringBuilder cb)
public void send(java.lang.String msgId, E msg, int priority, long expires, java.lang.String publisherId) throws MessageException
MessageException
public boolean hasMessage()
public void acknowledge(java.lang.String msgId)
msgId
- message to acknowledgepublic void rollback(java.lang.String msgId)
public Destination getJMSDestination()
public void close()
public java.lang.String toString()
toString
in class java.util.AbstractCollection<E>