| Modifier and Type | Field and Description |
|---|---|
static long |
DEFAULT_TIMEOUT
The default send timeout.
|
| Constructor and Description |
|---|
DeliveryOptions()
Default constructor
|
DeliveryOptions(DeliveryOptions other)
Copy constructor
|
DeliveryOptions(JsonObject json)
Create a delivery options from JSON
|
| Modifier and Type | Method and Description |
|---|---|
DeliveryOptions |
addHeader(String key,
String value)
Add a message header.
|
String |
getCodecName()
Get the codec name.
|
MultiMap |
getHeaders()
Get the message headers
|
long |
getSendTimeout()
Get the send timeout.
|
DeliveryOptions |
setCodecName(String codecName)
Set the codec name.
|
DeliveryOptions |
setHeaders(MultiMap headers)
Set message headers from a multi-map.
|
DeliveryOptions |
setSendTimeout(long timeout)
Set the send timeout.
|
public static final long DEFAULT_TIMEOUT
public DeliveryOptions()
public DeliveryOptions(DeliveryOptions other)
other - the options to copypublic DeliveryOptions(JsonObject json)
json - the JSONpublic long getSendTimeout()
When sending a message with a response handler a send timeout can be provided. If no response is received within the timeout the handler will be called with a failure.
public DeliveryOptions setSendTimeout(long timeout)
timeout - the timeout value, in ms.public String getCodecName()
When sending or publishing a message a codec name can be provided. This must correspond with a previously registered message codec. This allows you to send arbitrary objects on the event bus (e.g. POJOs).
public DeliveryOptions setCodecName(String codecName)
codecName - the codec namepublic DeliveryOptions addHeader(String key, String value)
Message headers can be sent with any message and will be accessible with Message.headers()
at the recipient.
key - the header keyvalue - the header valuepublic DeliveryOptions setHeaders(MultiMap headers)
headers - the headerspublic MultiMap getHeaders()
Copyright © 2015. All rights reserved.