|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.exolab.jms.messagemgr.MessageHandleFactory
This class defines a number of static methods that are responsible for creatimg message handles
Constructor Summary | |
MessageHandleFactory()
|
Method Summary | |
static MessageHandle |
createHandle(DurableConsumerEndpoint durable,
MessageImpl message)
Create a transient message handle for a durable consumer |
static MessageHandle |
createHandle(JmsDestination dest,
java.lang.String name,
MessageImpl message)
Create a transient message handle. |
static MessageHandle |
createHandle(QueueDestinationCache queue,
MessageImpl message)
Create a transient handle for a message belonging to a queue. |
static MessageHandle |
createPersistentHandle(java.sql.Connection connection,
DurableConsumerEndpoint durable,
MessageImpl message)
Create a persistent handle for a message belonging to a particular durable consumer |
static MessageHandle |
createPersistentHandle(java.sql.Connection connection,
JmsDestination dest,
java.lang.String name,
MessageImpl message)
Create a persistent message handle from the destination and consumer name |
static MessageHandle |
createPersistentHandle(java.sql.Connection connection,
QueueDestinationCache queue,
MessageImpl message)
Create a persistent message handle belonging to a queue. |
static MessageHandle |
createPersistentHandle(TransientMessageHandle handle)
Create a PersistentMessageHandle from the specified
TransientMessageHandle . |
static void |
destroyPersistentHandle(java.sql.Connection connection,
JmsDestination destination,
java.lang.String name,
MessageImpl message)
Destroy a persistent handle associated with a destination, consumer name and message |
static void |
destroyPersistentHandle(java.sql.Connection connection,
PersistentMessageHandle handle)
Destroy the specified persistent handle. |
static MessageHandle |
getHandle(ConsumerEndpoint consumer,
MessageImpl message)
Retrieve a message handle for the specified ConsumerEndpoint
and message. |
static MessageHandle |
getHandle(JmsDestination dest,
java.lang.String name,
MessageImpl message)
Use the message, destination and optionally, the consumer name to retrieve a message handle. |
static MessageHandle |
getHandle(MessageImpl message)
Retrieve a TransientMessageHandle given the specified message,
irrespective of whether it is a persistent or non-persistent message. |
static MessageHandle |
getHandle(QueueDestinationCache queue,
MessageImpl message)
Retrieve a MessageHandle from the
specified QueueConsumerEndpoint and message. |
static void |
updatePersistentHandle(java.sql.Connection connection,
PersistentMessageHandle handle)
Update the state of the persistent handle |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MessageHandleFactory()
Method Detail |
public static MessageHandle getHandle(MessageImpl message) throws javax.jms.JMSException
TransientMessageHandle
given the specified message,
irrespective of whether it is a persistent or non-persistent message.message
- the messagejavax.jms.JMSException
- if the handle can't be createdpublic static MessageHandle getHandle(QueueDestinationCache queue, MessageImpl message) throws javax.jms.JMSException
MessageHandle
from the
specified QueueConsumerEndpoint and message. It will create a
PersistentMessageHandle if the message is persistent or a
TransientMessageHandle otherwise.queue
- the queue destination cachemessage
- the messagejavax.jms.JMSException
- if the handle can't be createdpublic static MessageHandle getHandle(JmsDestination dest, java.lang.String name, MessageImpl message) throws javax.jms.JMSException
destination
- the message destinationname
- the consumer name, can be null for JmsQueue typemessage
- the messagejavax.jms.JMSException
- if the handle can't be createdpublic static MessageHandle getHandle(ConsumerEndpoint consumer, MessageImpl message) throws javax.jms.JMSException
ConsumerEndpoint
and message.consumer
- the consumer endpointmessage
- the messagejavax.jms.JMSException
- if the handle can't be createdpublic static MessageHandle createHandle(QueueDestinationCache queue, MessageImpl message) throws javax.jms.JMSException
queue
- the queue destination cachemessage
- the messagejavax.jms.JMSException
- if the handle can't be createdpublic static MessageHandle createHandle(DurableConsumerEndpoint durable, MessageImpl message) throws javax.jms.JMSException
durable
- the durable consumer endpointmessage
- the messagejavax.jms.JMSException
- if the handle can't be createdpublic static MessageHandle createHandle(JmsDestination dest, java.lang.String name, MessageImpl message) throws javax.jms.JMSException
destination
- the message destinationname
- the consumer name, can be null for JmsQueue typemessage
- the messagejavax.jms.JMSException
- if the handle can't be createdpublic static MessageHandle createPersistentHandle(TransientMessageHandle handle) throws javax.jms.JMSException
PersistentMessageHandle
from the specified
TransientMessageHandle
. It does not fill in all the fields of a
persistent message handle.handle
- the transient message handlejavax.jms.JMSException
- if the handle can't be createdpublic static MessageHandle createPersistentHandle(java.sql.Connection connection, QueueDestinationCache queue, MessageImpl message) throws javax.jms.JMSException, PersistenceException
connection
- connection to the databasequeue
- queue destination cachemessage
- the messagejavax.jms.JMSException
- if the handle can't be createdPersistenceException
- if the handle cannot be made persistentpublic static MessageHandle createPersistentHandle(java.sql.Connection connection, DurableConsumerEndpoint durable, MessageImpl message) throws javax.jms.JMSException, PersistenceException
connection
- the connection to use.durable
- durable consumer endpointmessage
- the messagejavax.jms.JMSException
- if the handle can't be createdPersistenceException
- if the handle cannot be made persistentpublic static MessageHandle createPersistentHandle(java.sql.Connection connection, JmsDestination dest, java.lang.String name, MessageImpl message) throws javax.jms.JMSException, PersistenceException
connection
- the connection to usedestination
- the message destinationname
- the consumer name, can be null for JmsQueue typemessage
- the messagejavax.jms.JMSException
- if the handle can't be createdPersistenceException
- if the handle cannot be made persistentpublic static void destroyPersistentHandle(java.sql.Connection connection, PersistentMessageHandle handle) throws PersistenceException
connection
- the connection to usehandle
- the persistent handle to destroyPersistenceExcetpion
- if there is a persistence-related errorpublic static void destroyPersistentHandle(java.sql.Connection connection, JmsDestination destination, java.lang.String name, MessageImpl message) throws javax.jms.JMSException, PersistenceException
connection
- the connection to usedestination
- the destination assoicated with the messagename
- the name of the consumermessage
- the messagejavax.jms.JMSException
- if the handle can't be createdPersistentException
- if there is a persistence related errorpublic static void updatePersistentHandle(java.sql.Connection connection, PersistentMessageHandle handle) throws PersistenceException
connection
- the connection to usehandle
- the handle to updatePersistentException
- if there is a persistence related error
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |