public class JMSQueueConsumer extends JMSConsumer
consumer, receiveMode, RECEIVEMODE_NOWAIT, RECEIVEMODE_WAIT, selector, subscriptionName, waitTimeOut
conFactoryName, conn, destinationHandle, destinationName, destinationType, env, isExternalSession, JMS_LOGGER, jmsLogger, NO_TX, providerPassword, providerUserName, QUEUE, session, SESSION_TX, TOPIC, txMode, valid
Constructor and Description |
---|
JMSQueueConsumer(java.lang.String destinationName,
java.lang.String selector,
javax.jms.Session session,
java.util.Properties env) |
JMSQueueConsumer(java.lang.String destinationName,
java.lang.String conFactoryName,
java.lang.String selector,
int txMode,
int receiveMode,
long waitTimeOut,
java.util.Properties env) |
JMSQueueConsumer(java.lang.String destinationName,
java.lang.String conFactoryName,
java.lang.String selector,
int txMode,
int receiveMode,
long waitTimeOut,
java.util.Properties env,
java.lang.String providerUserName,
java.lang.String providerPassword) |
JMSQueueConsumer(java.lang.String destinationName,
java.lang.String conFactoryName,
java.lang.String selector,
int txMode,
java.util.Properties env) |
JMSQueueConsumer(java.lang.String destinationName,
java.lang.String conFactoryName,
java.lang.String selector,
int txMode,
java.util.Properties env,
java.lang.String providerUserName,
java.lang.String providerPassword) |
Modifier and Type | Method and Description |
---|---|
JMSClient |
createClientInSession()
Creates another JMSClient of the same type in this clients Session.
|
int |
deleteAllMessages()
Delete all messages from the Queue which matches the selction criterion.
|
java.util.Map |
deleteMessage()
Deletes the first message that metaches the selection criterion from the Queue.
|
java.lang.String |
deleteMessage(boolean autocommit)
Deletes the first message that metaches the selection criterion from the Queue.
|
close, createClient, createClientInSession, createJMSProducerInSession, getJMSMessage, getMessage
commitTx, createConnection, createSession, getDestinationName, getEnvironment, getProviderPassword, getProviderUserName, getSession, invalidate, isValid, rollbackTx, setDestination
public JMSQueueConsumer(java.lang.String destinationName, java.lang.String conFactoryName, java.lang.String selector, int txMode, java.util.Properties env) throws MXException
destinationName
- the JNDI name of the Destination.conFactoryName
- the JNDI name of the ConnectionFactory.selector
- The message selector for the MessageConsumer.txMode
- The transaction mode for the JMS client Session.env
- The env properties to create an InitialContext.MXException
public JMSQueueConsumer(java.lang.String destinationName, java.lang.String selector, javax.jms.Session session, java.util.Properties env) throws MXException
destinationName
- the JNDI name of the Destination.selector
- The message selector for the MessageConsumer.session
- the JMS session from which the client should be created.env
- The env properties to create an InitialContext.MXException
public JMSQueueConsumer(java.lang.String destinationName, java.lang.String conFactoryName, java.lang.String selector, int txMode, java.util.Properties env, java.lang.String providerUserName, java.lang.String providerPassword) throws MXException
destinationName
- the JNDI name of the Destination.conFactoryName
- the JNDI name of the ConnectionFactory.selector
- The message selector for the MessageConsumer.txMode
- The transaction mode for the JMS client Session.env
- The env properties to create an InitialContext.providerUserName
- The provider connection user.providerPassword
- The provider connection password.MXException
public JMSQueueConsumer(java.lang.String destinationName, java.lang.String conFactoryName, java.lang.String selector, int txMode, int receiveMode, long waitTimeOut, java.util.Properties env) throws MXException
destinationName
- the JNDI name of the Destination.conFactoryName
- the JNDI name of the ConnectionFactory.selector
- The message selector for the MessageConsumer.txMode
- The transaction mode for the JMS client Session.receiveMode
- The default receive mode is RECEIVEMODE_NOWAIT.waitTimeOut
- The wait timeout in milliseconds.env
- The env properties to create an InitialContext.MXException
public JMSQueueConsumer(java.lang.String destinationName, java.lang.String conFactoryName, java.lang.String selector, int txMode, int receiveMode, long waitTimeOut, java.util.Properties env, java.lang.String providerUserName, java.lang.String providerPassword) throws MXException
destinationName
- the JNDI name of the Destination.conFactoryName
- the JNDI name of the ConnectionFactory.selector
- The message selector for the MessageConsumer.txMode
- The transaction mode for the JMS client Session.receiveMode
- The default receive mode is RECEIVEMODE_NOWAIT.waitTimeOut
- The wait timeout in milliseconds.env
- The env properties to create an InitialContext.providerUserName
- The provider connection user.providerPassword
- The provider connection password.MXException
public java.util.Map deleteMessage() throws MXException
MXException
public java.lang.String deleteMessage(boolean autocommit) throws MXException
autocommit
- if set to true will commit the JMS session transaction if a
transacted session is on.JMSData.MESSAGE_UNIQUEID
of the deleted message.MXException
public int deleteAllMessages() throws MXException
MXException
public JMSClient createClientInSession() throws MXException
JMSClient
createClientInSession
in class JMSConsumer
MXException