| java.lang.Object org.apache.jmeter.protocol.jms.client.OnMessageSubscriber
OnMessageSubscriber | public class OnMessageSubscriber (Code) | | author: pete author: OnMessageSubscriber is designed to create the connection, session and author: subscriber. The sampler is responsible for implementing author: javax.jms.MessageListener interface and onMessage(Message msg) method. author: The implementation provides a close() method to clean up the client at the author: end of a test. This is important to make sure there aren't any zombie threads author: or odd memory leaks. |
Field Summary | |
static Logger | log |
OnMessageSubscriber | public OnMessageSubscriber()(Code) | | |
OnMessageSubscriber | public OnMessageSubscriber(boolean useProps, String jndi, String url, String connfactory, String topic, String useAuth, String user, String pwd)(Code) | | Constructor takes the necessary JNDI related parameters to create a
connection and begin receiving messages.
Parameters: useProps - Parameters: jndi - Parameters: url - Parameters: connfactory - Parameters: topic - Parameters: useAuth - Parameters: user - Parameters: pwd - |
close | public void close()(Code) | | close will close all the objects and set them to null.
|
initConnection | public void initConnection(Context ctx, String connfactory, String topic)(Code) | | Initialize the connection, session and subscriber
Parameters: ctx - Parameters: connfactory - Parameters: topic - |
initJNDI | public Context initJNDI(boolean useProps, String jndi, String url, String useAuth, String user, String pwd)(Code) | | initialize the JNDI intial context
Parameters: useProps - Parameters: jndi - Parameters: url - Parameters: useAuth - Parameters: user - Parameters: pwd - the context or null |
resume | public void resume()(Code) | | resume will call Connection.start() to begin receiving inbound messages.
|
setMessageListener | public void setMessageListener(MessageListener listener)(Code) | | The sample uses this method to set itself as the listener. That means the
sampler need to implement MessageListener interface.
Parameters: listener - |
|
|