Home » jakarta-jmeter-2.3.4_src » org.apache.jmeter.protocol.jms.client » [javadoc | source]
org.apache.jmeter.protocol.jms.client
public class: ReceiveSubscriber [javadoc | source]
java.lang.Object
   org.apache.jmeter.protocol.jms.client.ReceiveSubscriber

All Implemented Interfaces:
    Runnable

Receives messages in a separate thread until told to stop. Run loop permanently receives messages; the sampler calls reset() when it has taken enough messages.
Constructor:
 public ReceiveSubscriber(boolean useProps,
    String jndi,
    String url,
    String connfactory,
    String topic,
    boolean useAuth,
    String user,
    String pwd) 
Method from org.apache.jmeter.protocol.jms.client.ReceiveSubscriber Summary:
close,   count,   getByteResult,   getMessage,   reset,   resume,   run,   setLoop,   start
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.jmeter.protocol.jms.client.ReceiveSubscriber Detail:
 public synchronized  void close() 
    close() will stop the connection first. Then it closes the subscriber, session and connection.
 public synchronized int count(int increment) 
    Increment the count and return the new value
 public synchronized byte[] getByteResult() 
    Get the message(s) as an array of byte[]
 public synchronized String getMessage() 
    Get the message as a string
 public synchronized  void reset() 
    Reset the receiver ready for receiving any further messages
 public  void resume() 
    Resume will call Connection.start() and begin receiving messages from the JMS provider.
 public  void run() 
    run calls listen to begin listening for inbound messages from the provider. Updates the count field so the caller can check how many messages have been receieved.
 public  void setLoop(int loop) 
    Set the number of iterations for each call to sample()
 public  void start() 
    start will create a new thread and pass this class. once the thread is created, it calls Thread.start().