|
Apache JMeter | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.jmeter.protocol.jms.client.ReceiveSubscriber
public class ReceiveSubscriber
Generic MessageConsumer class, which has two possible strategies.
getMessage(long)
method is used to return the next message,
either directly using receive(timeout) or from the queue using poll(timeout).
Constructor Summary | |
---|---|
ReceiveSubscriber(boolean useProps,
String initialContextFactory,
String providerUrl,
String connfactory,
String destinationName,
String durableSubscriptionId,
String clientId,
String jmsSelector,
boolean useAuth,
String securityPrincipal,
String securityCredentials)
Constructor takes the necessary JNDI related parameters to create a connection and prepare to begin receiving messages. |
|
ReceiveSubscriber(int queueSize,
boolean useProps,
String initialContextFactory,
String providerUrl,
String connfactory,
String destinationName,
String durableSubscriptionId,
String clientId,
String jmsSelector,
boolean useAuth,
String securityPrincipal,
String securityCredentials)
Constructor takes the necessary JNDI related parameters to create a connection and create an onMessageListener to prepare to begin receiving messages. |
Method Summary | |
---|---|
void |
close()
close() will stop the connection first. |
javax.jms.Message |
getMessage(long timeout)
Get the next message or null. |
void |
onMessage(javax.jms.Message message)
|
void |
start()
Calls Connection.start() to begin receiving inbound messages. |
void |
stop()
Calls Connection.stop() to stop receiving inbound messages. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ReceiveSubscriber(boolean useProps, String initialContextFactory, String providerUrl, String connfactory, String destinationName, String durableSubscriptionId, String clientId, String jmsSelector, boolean useAuth, String securityPrincipal, String securityCredentials) throws NamingException, javax.jms.JMSException
start()
to enable message reception.
useProps
- if true, use jndi.properties instead of
initialContextFactory, providerUrl, securityPrincipal, securityCredentialsinitialContextFactory
- providerUrl
- connfactory
- destinationName
- durableSubscriptionId
- clientId
- jmsSelector
- Message SelectoruseAuth
- securityPrincipal
- securityCredentials
-
javax.jms.JMSException
- if could not create context or other problem occurred.
NamingException
public ReceiveSubscriber(int queueSize, boolean useProps, String initialContextFactory, String providerUrl, String connfactory, String destinationName, String durableSubscriptionId, String clientId, String jmsSelector, boolean useAuth, String securityPrincipal, String securityCredentials) throws NamingException, javax.jms.JMSException
start()
to enable message reception.
queueSize
- maximum queue size <=0 == no limituseProps
- if true, use jndi.properties instead of
initialContextFactory, providerUrl, securityPrincipal, securityCredentialsinitialContextFactory
- providerUrl
- connfactory
- destinationName
- durableSubscriptionId
- clientId
- jmsSelector
- Message SelectoruseAuth
- securityPrincipal
- securityCredentials
-
javax.jms.JMSException
- if could not create context or other problem occurred.
NamingException
Method Detail |
---|
public void start() throws javax.jms.JMSException
javax.jms.JMSException
public void stop() throws javax.jms.JMSException
javax.jms.JMSException
public javax.jms.Message getMessage(long timeout) throws javax.jms.JMSException
timeout
- in milliseconds
javax.jms.JMSException
public void close()
close
in interface Closeable
public void onMessage(javax.jms.Message message)
onMessage
in interface javax.jms.MessageListener
|
Apache JMeter | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |