public class CoapSender extends AbstractSender
Constructor and Description |
---|
CoapSender() |
Modifier and Type | Method and Description |
---|---|
void |
doClose() |
void |
doInit(Properties messageAttributes) |
Serializable |
doSend(Message message,
MeasurementUnit measurementUnit)
Actually performs the send operation.
|
org.perfcake.message.sender.CoapSender.CoapMethod |
getMethod()
Returns the method that the CoAP will use to send the requests.
|
org.perfcake.message.sender.CoapSender.CoapRequestType |
getRequestType()
Returns the method that the CoAP will use to send the requests.
|
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.
|
CoapSender |
setMethod(org.perfcake.message.sender.CoapSender.CoapMethod method)
Sets the CoAP method.
|
CoapSender |
setRequestType(org.perfcake.message.sender.CoapSender.CoapRequestType requestType)
Sets the CoAP request type.
|
close, getTarget, getTarget, init, isKeepConnection, postSend, 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 doClose() throws PerfCakeException
doClose
in class AbstractSender
PerfCakeException
public org.perfcake.message.sender.CoapSender.CoapMethod getMethod()
public CoapSender setMethod(org.perfcake.message.sender.CoapSender.CoapMethod method)
method
- The CoAP request method.public org.perfcake.message.sender.CoapSender.CoapRequestType getRequestType()
public CoapSender setRequestType(org.perfcake.message.sender.CoapSender.CoapRequestType requestType)
requestType
- The type of CoAP request.Copyright © 2010–2017 PerfCake Community. All rights reserved.