|
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
public class 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,
java.lang.String jndi,
java.lang.String url,
java.lang.String connfactory,
java.lang.String topic,
boolean useAuth,
java.lang.String user,
java.lang.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(javax.naming.Context ctx,
java.lang.String connfactory,
java.lang.String topic)
Initialize the connection, session and subscriber |
javax.naming.Context |
initJNDI(boolean useProps,
java.lang.String jndi,
java.lang.String url,
boolean useAuth,
java.lang.String user,
java.lang.String pwd)
initialize the JNDI intial context |
void |
resume()
resume will call Connection.start() to begin receiving inbound messages. |
void |
setMessageListener(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, java.lang.String jndi, java.lang.String url, java.lang.String connfactory, java.lang.String topic, boolean useAuth, java.lang.String user, java.lang.String pwd)
useProps
- jndi
- url
- connfactory
- topic
- useAuth
- user
- pwd
- Method Detail |
---|
public javax.naming.Context initJNDI(boolean useProps, java.lang.String jndi, java.lang.String url, boolean useAuth, java.lang.String user, java.lang.String pwd)
useProps
- jndi
- url
- useAuth
- user
- pwd
-
public void initConnection(javax.naming.Context ctx, java.lang.String connfactory, java.lang.String topic)
ctx
- connfactory
- topic
- public void resume()
public void close()
public void setMessageListener(MessageListener listener)
listener
-
|
Apache JMeter | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |