public class JMSQueueBrowser extends JMSClient
conFactoryName, conn, destinationHandle, destinationName, destinationType, env, isExternalSession, JMS_LOGGER, jmsLogger, NO_TX, providerPassword, providerUserName, QUEUE, session, SESSION_TX, TOPIC, txMode, valid| Constructor and Description |
|---|
JMSQueueBrowser(java.lang.String destinationName,
java.lang.String selector,
javax.jms.Session session,
java.util.Properties env) |
JMSQueueBrowser(java.lang.String destinationName,
java.lang.String conFactoryName,
java.lang.String selector,
java.util.Properties env) |
JMSQueueBrowser(java.lang.String destinationName,
java.lang.String conFactoryName,
java.lang.String selector,
java.util.Properties env,
java.lang.String providerUserName,
java.lang.String providerPassword) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Releses all resources that is cached by the client like JMS Session and
Connection.
|
protected void |
createClient()
Internal method to create the MessageConsumer from the JMS Session.
|
JMSClient |
createClientInSession()
Creates another JMSClient of the same type in this clients Session.
|
JMSClient |
createClientInSession(java.lang.String destinationName,
java.util.Properties env)
Creates another JMSClient of the same type in this clients Session.
|
java.util.List |
getAllMessages() |
java.util.List |
getMessages(int n) |
boolean |
isMessageInQueue() |
void |
waitTillMessageInQueue(long sleepFrequency)
This call blocks for
MAX_ITERATIONS*sleepFrequency for the
message in the Queue. |
commitTx, createConnection, createSession, getDestinationName, getEnvironment, getProviderPassword, getProviderUserName, getSession, invalidate, isValid, rollbackTx, setDestinationpublic JMSQueueBrowser(java.lang.String destinationName,
java.lang.String conFactoryName,
java.lang.String selector,
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.env - The env properties to create an InitialContext.MXExceptionpublic JMSQueueBrowser(java.lang.String destinationName,
java.lang.String conFactoryName,
java.lang.String selector,
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.env - The env properties to create an InitialContext.providerUserName - The provider connection user.providerPassword - The provider connection password.MXExceptionpublic JMSQueueBrowser(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.MXExceptionprotected void createClient()
throws MXException
JMSClientMXExceptionpublic void close()
JMSClientpublic void waitTillMessageInQueue(long sleepFrequency)
MAX_ITERATIONS*sleepFrequency for the
message in the Queue.sleepFrequency - the check frequesncy in millis.public boolean isMessageInQueue()
public java.util.List getAllMessages()
selector.public java.util.List getMessages(int n)
public JMSClient createClientInSession() throws MXException
JMSClientcreateClientInSession in class JMSClientMXExceptionpublic JMSClient createClientInSession(java.lang.String destinationName, java.util.Properties env) throws MXException
JMSClientcreateClientInSession in class JMSClientMXException