|
Apache JMeter | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jmeter.threads.ListenerNotifier
The ListenerNotifier
thread is responsible for performing
asynchronous notifications that a sample has occurred. Each time a sample
occurs, the addLast
method should be called to add the sample
and its list of listeners to the notification queue. This thread will then
notify those listeners asynchronously at some future time.
In the current implementation, the notifications will be made in batches, with 2 seconds between the beginning of successive batches. If the notifier thread starts to get behind, the priority of the thread will be increased in an attempt to help it to keep up.
SampleListener
Constructor Summary | |
ListenerNotifier()
|
Method Summary | |
void |
addLast(SampleEvent item,
List listeners)
Add a new sample event to the notification queue. |
boolean |
isStopped()
Indicates whether or not the thread has stopped. |
void |
notifyListeners(SampleEvent res,
List listeners)
Notify a list of listeners that a sample has occurred. |
void |
run()
Process the events in the notification queue until the thread has been told to stop and the notification queue is empty. |
void |
stop()
Stops the ListenerNotifier thread. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ListenerNotifier()
Method Detail |
public void stop()
public boolean isStopped()
stop
method has been called and any
remaining notifications in the queue have been completed.
public void run()
In the current implementation, this method will iterate continually until the thread is told to stop. In each iteration it will process any notifications that are in the queue at the beginning of the iteration, and then will sleep until it is time to start the next batch. As long as the thread is keeping up, each batch should start 2 seconds after the beginning of the last batch. This exact behavior is subject to change.
public void notifyListeners(SampleEvent res, List listeners)
res
- the sample event that has occurred. Must be non-null.listeners
- a list of the listeners which should be notified. This list
must not be null and must contain only SampleListener
elements.public void addLast(SampleEvent item, List listeners)
item
- the sample event that has occurred. Must be non-null.listeners
- a list of the listeners which should be notified. This list
must not be null and must contain only SampleListener
elements.
|
Apache JMeter | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |