public class MqttSender extends AbstractSender
Constructor and Description |
---|
MqttSender() |
Modifier and Type | Method and Description |
---|---|
void |
doClose() |
void |
doInit(Properties messageAttributes) |
Serializable |
doSend(Message message,
MeasurementUnit measurementUnit)
Actually performs the send operation.
|
String |
getPassword()
Gets the MQTT server password.
|
String |
getQos()
Gets the required quality of service.
|
String |
getResponsePassword()
Gets the response server password.
|
String |
getResponseQos()
Gets the required response quality of service.
|
String |
getResponseTarget()
Gets where to read the response from.
|
String |
getResponseUserName()
Gets the response server user name.
|
String |
getUserName()
Gets the MQTT server user name.
|
void |
postSend(Message message)
Performs any action that needs to be done to complete the sending of the message but is not directly related to the sending operation and thus not measured.
|
void |
preSend(Message message,
Properties messageAttributes)
Performs any action that needs to be done to send the message but is not directly related to the sending operation and thus not measured.
|
MqttSender |
setPassword(String password)
Sets the MQTT server password.
|
MqttSender |
setQos(String qos)
Sets the required quality of service.
|
MqttSender |
setResponsePassword(String responsePassword)
Sets the response server password.
|
MqttSender |
setResponseQos(String responseQos)
Sets the required response quality of service.
|
MqttSender |
setResponseTarget(String responseTarget)
Sets where to read the response from.
|
MqttSender |
setResponseUserName(String responseUserName)
Sets the tesponse server user name.
|
MqttSender |
setUserName(String userName)
Sets the MQTT server user name.
|
close, getTarget, getTarget, init, isKeepConnection, safeGetTarget, send, setKeepConnection, setTarget
public void doInit(Properties messageAttributes) throws PerfCakeException
doInit
in class AbstractSender
PerfCakeException
public void preSend(Message message, Properties messageAttributes) throws Exception
MessageSender
preSend
in interface MessageSender
preSend
in class AbstractSender
message
- Message to be sent.messageAttributes
- Attributes that can be used to replace placeholders in message and or target.Exception
- In case anything fails during the preparation.public Serializable doSend(Message message, MeasurementUnit measurementUnit) throws Exception
AbstractSender
doSend
in class AbstractSender
message
- Message to be sent.measurementUnit
- Measurement unit carrying the current stop-watch.Exception
- When the sending operation failed.MessageSender.send(org.perfcake.message.Message, org.perfcake.reporting.MeasurementUnit)
public void postSend(Message message) throws Exception
MessageSender
postSend
in interface MessageSender
postSend
in class AbstractSender
message
- Message that was sent.Exception
- In case anything fails during the finalization.public void doClose() throws PerfCakeException
doClose
in class AbstractSender
PerfCakeException
public String getResponseQos()
public MqttSender setResponseQos(String responseQos)
responseQos
- The required response quality of service.public String getResponseTarget()
public MqttSender setResponseTarget(String responseTarget)
responseTarget
- Where to read the response from.public String getQos()
public MqttSender setQos(String qos)
qos
- The required quality of service.public String getUserName()
public MqttSender setUserName(String userName)
userName
- The MQTT server user name.public String getPassword()
public MqttSender setPassword(String password)
password
- The MQTT server password.public String getResponseUserName()
public MqttSender setResponseUserName(String responseUserName)
responseUserName
- The response server user name.public String getResponsePassword()
public MqttSender setResponsePassword(String responsePassword)
responsePassword
- The response server password.Copyright © 2010–2017 PerfCake Community. All rights reserved.