|
Apache JMeter | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jmeter.protocol.jms.client.OnMessageSubscriber
OnMessageSubscriber is designed to create the connection, session and subscriber. The sampler is responsible for implementing javax.jms.MessageListener interface and onMessage(Message msg) method. The implementation provides a close() method to clean up the client at the end of a test. This is important to make sure there aren't any zombie threads or odd memory leaks.
Constructor Summary | |
OnMessageSubscriber()
|
|
OnMessageSubscriber(boolean useProps,
String jndi,
String url,
String connfactory,
String topic,
boolean useAuth,
String user,
String pwd)
Constructor takes the necessary JNDI related parameters to create a connection and begin receiving messages. |
Method Summary | |
void |
close()
close will close all the objects and set them to null. |
void |
initConnection(Context ctx,
String connfactory,
String topic)
Initialize the connection, session and subscriber |
Context |
initJNDI(boolean useProps,
String jndi,
String url,
boolean useAuth,
String user,
String pwd)
initialize the JNDI intial context |
void |
resume()
resume will call Connection.start() to begin receiving inbound messages. |
void |
setMessageListener(javax.jms.MessageListener listener)
The sample uses this method to set itself as the listener. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public OnMessageSubscriber()
public OnMessageSubscriber(boolean useProps, String jndi, String url, String connfactory, String topic, boolean useAuth, String user, String pwd)
useProps
- jndi
- url
- connfactory
- topic
- useAuth
- user
- pwd
- Method Detail |
public Context initJNDI(boolean useProps, String jndi, String url, boolean useAuth, String user, String pwd)
useProps
- jndi
- url
- useAuth
- user
- pwd
-
public void initConnection(Context ctx, String connfactory, String topic)
ctx
- connfactory
- topic
- public void resume()
public void close()
public void setMessageListener(javax.jms.MessageListener listener)
listener
-
|
Apache JMeter | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |