public class ThroughputSamplerMessageHandler
extends java.lang.Object
implements org.springframework.messaging.MessageHandler
Message
with the given startMessage
and a endMessage
and
reports the throughput in the given TimeUnit
.Constructor and Description |
---|
ThroughputSamplerMessageHandler()
Create a ThroughputSamplerMessageHandler using the
String START as the start
message and the String END as the end message and measure throughput in seconds. |
ThroughputSamplerMessageHandler(java.lang.Object startMessage,
java.lang.Object endMessage,
java.util.concurrent.TimeUnit sampleUnit) |
ThroughputSamplerMessageHandler(java.lang.String startMessage,
java.lang.String endMessage,
java.lang.String sampleUnit) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getEndMessage() |
java.util.concurrent.TimeUnit |
getSampleUnit() |
java.lang.Object |
getStartMessage() |
void |
handleMessage(org.springframework.messaging.Message<?> message) |
void |
setEndMessage(java.lang.Object endMessage) |
void |
setSampleUnit(java.lang.String sampleUnit) |
void |
setSampleUnit(java.util.concurrent.TimeUnit sampleUnit) |
void |
setStartMessage(java.lang.Object startMessage) |
public ThroughputSamplerMessageHandler()
String
START as the start
message and the String
END as the end message and measure throughput in seconds.public ThroughputSamplerMessageHandler(java.lang.Object startMessage, java.lang.Object endMessage, java.util.concurrent.TimeUnit sampleUnit)
public ThroughputSamplerMessageHandler(java.lang.String startMessage, java.lang.String endMessage, java.lang.String sampleUnit)
public java.lang.Object getStartMessage()
public void setStartMessage(java.lang.Object startMessage)
public java.lang.Object getEndMessage()
public void setEndMessage(java.lang.Object endMessage)
public java.util.concurrent.TimeUnit getSampleUnit()
public void setSampleUnit(java.lang.String sampleUnit)
public void setSampleUnit(java.util.concurrent.TimeUnit sampleUnit)
public void handleMessage(org.springframework.messaging.Message<?> message) throws org.springframework.messaging.MessagingException
handleMessage
in interface org.springframework.messaging.MessageHandler
org.springframework.messaging.MessagingException