public interface Receiver
SenderTask
.
A receiver must start the defined (using the setThreads(int)
method) threads to receive messages.
These threads are later stopped with Thread.interrupt()
. It is up to the receiver threads to react accordingly.
Receivers must be executed as daemon threads and can be terminated at the end of the test execution if they do not react to the interruption.Modifier and Type | Method and Description |
---|---|
String |
getSource()
Gets the source from where to receive the messages.
|
Receiver |
setCorrelator(Correlator correlator)
Sets the correlator that will be handling the responses.
|
Receiver |
setSource(String source)
Sets the source from where to receive the messages.
|
Receiver |
setThreads(int threadCount)
Sets the number of threads that will be receiving responses.
|
void |
start()
Starts all receiver threads.
|
void |
stop()
Stops all the receiver threads.
|
Receiver setThreads(int threadCount)
threadCount
- The number of threads that will be receiving responses.Receiver setCorrelator(Correlator correlator)
correlator
- The correlator that will be handling the responses.void start() throws PerfCakeException
PerfCakeException
- When it was not possible to start all threads.void stop()
String getSource()
Copyright © 2010–2017 PerfCake Community. All rights reserved.