|
||||||||||
| 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.file.FileQueue
public class FileQueue
A JMS queue backed by a file-based database. The URL looks like
file:name=my-name;path=file:/var/www/webapps/test/WEB-INFjmsIt is configured as:
<jms-queue jndi-name="jms/my-name" uri="file:path=WEB-INF/jms"/>
| Field Summary |
|---|
| Fields inherited from class com.caucho.jms.queue.AbstractDestination |
|---|
_messageFactory |
| Constructor Summary | |
|---|---|
FileQueue()
|
|
FileQueue(java.lang.String name)
|
|
| Method Summary | |
|---|---|
void |
acknowledge(java.lang.String msgId)
Rollsback the message from the store. |
Path |
getPath()
|
int |
getQueueSize()
Returns the queue size |
java.lang.String |
getUrl()
Returns the JMS configuration url. |
void |
init()
Initialize the queue |
MessageImpl |
receive(boolean isAutoAck)
Polls the next message from the store. |
void |
removeMessage(java.lang.String msgId)
Rollsback the message from the store. |
void |
rollback(java.lang.String msgId)
Rollsback the message from the store. |
void |
send(JmsSession session,
MessageImpl msg,
int priority,
long expires)
Adds the message to the persistent store. |
void |
sendBackup(JmsSession session,
MessageImpl msg,
long leaseTimeout,
int priority,
long expires)
Adds the message to the persistent store. |
void |
setPath(Path path)
Sets the path to the backing database |
void |
setTablePrefix(java.lang.String prefix)
|
| Methods inherited from class com.caucho.jms.queue.AbstractQueue |
|---|
addListenerException, addMessageAvailableListener, close, 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, hasMessage, 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, toString, wait, wait, wait |
| Methods inherited from interface javax.jms.Topic |
|---|
getTopicName, toString |
| 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 FileQueue()
public FileQueue(java.lang.String name)
| Method Detail |
|---|
public void setPath(Path path)
public Path getPath()
public void setTablePrefix(java.lang.String prefix)
public java.lang.String getUrl()
getUrl in class AbstractDestinationpublic int getQueueSize()
AbstractQueue
getQueueSize in class AbstractQueuepublic void init()
init in class AbstractQueue
public void send(JmsSession session,
MessageImpl msg,
int priority,
long expires)
send in class AbstractDestinationmsg - the message to storeexpires - the expires time
public void sendBackup(JmsSession session,
MessageImpl msg,
long leaseTimeout,
int priority,
long expires)
msg - the message to storeexpires - the expires timepublic MessageImpl receive(boolean isAutoAck)
receive in class AbstractDestinationisAutoAck - if true, automatically acknowledge the messagepublic void rollback(java.lang.String msgId)
rollback in class AbstractDestinationpublic void acknowledge(java.lang.String msgId)
acknowledge in class AbstractDestinationmsgId - message to acknowledgepublic void removeMessage(java.lang.String msgId)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||