|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractQueue
com.caucho.jms.queue.AbstractDestination
com.caucho.jms.queue.AbstractQueue
com.caucho.jms.cluster.ServerQueue
public class ServerQueue
Implements a cluster receive queue.
| Field Summary |
|---|
| Fields inherited from class com.caucho.jms.queue.AbstractDestination |
|---|
_messageFactory |
| Constructor Summary | |
|---|---|
ServerQueue()
|
|
ServerQueue(java.lang.String name)
|
|
| Method Summary | |
|---|---|
void |
acknowledge(java.lang.String msgId)
Acknowledge receipt of the message. |
void |
close()
|
MessageImpl |
createMessage(int msg)
|
int |
getQueueSize()
Returns the queue size |
java.lang.String |
getUrl()
Returns the JMS configuration url. |
boolean |
hasMessage()
Returns true if the queue has at least one message available |
boolean |
hasMessage(java.lang.String subscription)
|
void |
init()
|
boolean |
isBackup()
Set true if messages should be backed up. |
MessageImpl |
receive(boolean isAutoAck)
Polls the next message from the store. |
MessageImpl |
receiveCluster(java.lang.String subscription,
boolean isAutoAck)
Polls the next message from the store. |
void |
removeCluster(java.lang.String id)
Removes the message from the store, due to another server handling it |
void |
rollback(java.lang.String msgId)
Rollback the message read. |
void |
send(JmsSession session,
MessageImpl msg,
int priority,
long expires)
Sends a message to the queue |
void |
sendCluster(MessageImpl msg,
long timeout)
|
void |
sendClusterBackup(MessageImpl msg,
long timeout)
|
void |
setBackup(boolean isBackup)
Set true if messages should be backed up. |
void |
setPath(Path path)
|
| Methods inherited from class com.caucho.jms.queue.AbstractQueue |
|---|
addListenerException, addMessageAvailableListener, getBrowserList, getConsumerCount, getListenerFailCountTotal, getListenerFailLastTime, notifyMessageAvailable, postConstruct, removeMessageAvailableListener, setQueueName, startPoll, stopPoll |
| Methods inherited from class com.caucho.jms.queue.AbstractDestination |
|---|
drainTo, drainTo, generateMessageID, generateMessageID, getJMSDestination, getName, getQueueName, getReadConsumer, getTopicName, getWriteSession, iterator, offer, offer, peek, poll, poll, put, remainingCapacity, setName, setSerializationHandle, size, take, toString |
| Methods inherited from class java.util.AbstractQueue |
|---|
add, addAll, clear, element, remove |
| Methods inherited from class java.util.AbstractCollection |
|---|
contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface javax.jms.Queue |
|---|
getQueueName, toString |
| Methods inherited from interface java.util.concurrent.BlockingQueue |
|---|
add, contains, remove |
| Methods inherited from interface java.util.Queue |
|---|
element, remove |
| Methods inherited from interface java.util.Collection |
|---|
addAll, clear, containsAll, equals, hashCode, isEmpty, removeAll, retainAll, toArray, toArray |
| Constructor Detail |
|---|
public ServerQueue()
public ServerQueue(java.lang.String name)
| Method Detail |
|---|
public void setPath(Path path)
public void setBackup(boolean isBackup)
public boolean isBackup()
public java.lang.String getUrl()
getUrl in class AbstractDestinationpublic int getQueueSize()
AbstractQueue
getQueueSize in class AbstractQueuepublic void init()
init in class AbstractQueuepublic MessageImpl createMessage(int msg)
createMessage in interface ServerDestination
public void send(JmsSession session,
MessageImpl msg,
int priority,
long expires)
throws JMSException
AbstractDestination
send in class AbstractDestinationJMSExceptionpublic void rollback(java.lang.String msgId)
AbstractDestination
rollback in interface ServerDestinationrollback in class AbstractDestinationpublic void acknowledge(java.lang.String msgId)
AbstractDestination
acknowledge in interface ServerDestinationacknowledge in class AbstractDestinationmsgId - message to acknowledgepublic MessageImpl receive(boolean isAutoAck)
receive in class AbstractDestinationisAutoAck - if true, automatically acknowledge the messagepublic boolean hasMessage()
AbstractDestination
hasMessage in class AbstractDestination
public void sendCluster(MessageImpl msg,
long timeout)
throws JMSException
sendCluster in interface ServerDestinationJMSException
public void sendClusterBackup(MessageImpl msg,
long timeout)
throws JMSException
sendClusterBackup in interface ServerDestinationJMSException
public MessageImpl receiveCluster(java.lang.String subscription,
boolean isAutoAck)
receiveCluster in interface ServerDestinationpublic void removeCluster(java.lang.String id)
removeCluster in interface ServerDestinationpublic boolean hasMessage(java.lang.String subscription)
hasMessage in interface ServerDestinationpublic void close()
close in class AbstractQueue
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||