Class RemoteSampleListenerImpl
- java.lang.Object
-
- java.rmi.server.RemoteObject
-
- java.rmi.server.RemoteServer
-
- java.rmi.server.UnicastRemoteObject
-
- org.apache.jmeter.samplers.RemoteSampleListenerImpl
-
- All Implemented Interfaces:
Serializable
,Remote
,RemoteSampleListener
,SampleListener
,TestStateListener
public class RemoteSampleListenerImpl extends UnicastRemoteObject implements RemoteSampleListener, SampleListener, TestStateListener
Implementation of remote sampler listener, also supports TestStateListener- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class java.rmi.server.RemoteObject
ref
-
-
Constructor Summary
Constructors Constructor Description RemoteSampleListenerImpl(Object listener)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
processBatch(List<SampleEvent> samples)
This method is called remotely and fires a list of samples events received locally.void
sampleOccurred(SampleEvent e)
A sample has started and stopped.void
sampleStarted(SampleEvent e)
A sample has started.void
sampleStopped(SampleEvent e)
A sample has stopped.void
testEnded()
Called once for all threads after the end of a test.void
testEnded(String host)
Called once for all threads after the end of a test.void
testStarted()
Called just before the start of the test from the main engine thread.void
testStarted(String host)
Called just before the start of the test from the main engine thread.-
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, exportObject, exportObject, unexportObject
-
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
-
-
-
-
Constructor Detail
-
RemoteSampleListenerImpl
public RemoteSampleListenerImpl(Object listener) throws RemoteException
- Throws:
RemoteException
-
-
Method Detail
-
testStarted
public void testStarted()
Description copied from interface:TestStateListener
Called just before the start of the test from the main engine thread. This is before the test elements are cloned. Note that not all the test variables will have been set up at this point.
N.B. testStarted() and testEnded() are called from different threads.
- Specified by:
testStarted
in interfaceRemoteSampleListener
- Specified by:
testStarted
in interfaceTestStateListener
- See Also:
StandardJMeterEngine.run()
-
testStarted
public void testStarted(String host)
Description copied from interface:TestStateListener
Called just before the start of the test from the main engine thread. This is before the test elements are cloned. Note that not all the test variables will have been set up at this point.
N.B. testStarted() and testEnded() are called from different threads.
- Specified by:
testStarted
in interfaceRemoteSampleListener
- Specified by:
testStarted
in interfaceTestStateListener
- Parameters:
host
- name of host- See Also:
StandardJMeterEngine.run()
-
testEnded
public void testEnded()
Description copied from interface:TestStateListener
Called once for all threads after the end of a test. This will use the same element instances as at the start of the test.
N.B. testStarted() and testEnded() are called from different threads.
- Specified by:
testEnded
in interfaceRemoteSampleListener
- Specified by:
testEnded
in interfaceTestStateListener
- See Also:
StandardJMeterEngine.stopTest()
-
testEnded
public void testEnded(String host)
Description copied from interface:TestStateListener
Called once for all threads after the end of a test. This will use the same element instances as at the start of the test.
N.B. testStarted() and testEnded() are called from different threads.
- Specified by:
testEnded
in interfaceRemoteSampleListener
- Specified by:
testEnded
in interfaceTestStateListener
- Parameters:
host
- name of host- See Also:
StandardJMeterEngine.stopTest()
-
processBatch
public void processBatch(List<SampleEvent> samples)
This method is called remotely and fires a list of samples events received locally. The function is to reduce network load when using remote testing.- Specified by:
processBatch
in interfaceRemoteSampleListener
- Parameters:
samples
- the list of sample events to be fired locally
-
sampleOccurred
public void sampleOccurred(SampleEvent e)
Description copied from interface:RemoteSampleListener
A sample has started and stopped.- Specified by:
sampleOccurred
in interfaceRemoteSampleListener
- Specified by:
sampleOccurred
in interfaceSampleListener
- Parameters:
e
- the event with data about the completed sample
-
sampleStarted
public void sampleStarted(SampleEvent e)
A sample has started.- Specified by:
sampleStarted
in interfaceRemoteSampleListener
- Specified by:
sampleStarted
in interfaceSampleListener
- Parameters:
e
- the event with data about the started sample
-
sampleStopped
public void sampleStopped(SampleEvent e)
A sample has stopped.- Specified by:
sampleStopped
in interfaceRemoteSampleListener
- Specified by:
sampleStopped
in interfaceSampleListener
- Parameters:
e
- the event with data about the stopped sample
-
-