| Modifier and Type | Field and Description | 
|---|---|
static boolean | 
DEFAULT_LOCAL_ONLY
Whether the message should be delivered to local consumers only by default = false. 
 | 
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. 
 | 
boolean | 
isLocalOnly()  | 
DeliveryOptions | 
setCodecName(String codecName)
Set the codec name. 
 | 
DeliveryOptions | 
setHeaders(MultiMap headers)
Set message headers from a multi-map. 
 | 
DeliveryOptions | 
setLocalOnly(boolean localOnly)
Whether a message should be delivered to local consumers only. 
 | 
DeliveryOptions | 
setSendTimeout(long timeout)
Set the send timeout. 
 | 
JsonObject | 
toJson()
Convert to JSON. 
 | 
public static final long DEFAULT_TIMEOUT
public static final boolean DEFAULT_LOCAL_ONLY
public DeliveryOptions()
public DeliveryOptions(DeliveryOptions other)
other - the options to copypublic DeliveryOptions(JsonObject json)
json - the JSONpublic JsonObject toJson()
public 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()
public boolean isLocalOnly()
public DeliveryOptions setLocalOnly(boolean localOnly)
false.
 This option is effective in clustered mode only and does not apply to reply messages.
localOnly - true to deliver to local consumers only, false otherwiseCopyright © 2020 Eclipse. All rights reserved.