Package io.vertx.mutiny.amqp
Class AmqpMessage
java.lang.Object
io.vertx.mutiny.amqp.AmqpMessage
- All Implemented Interfaces:
MutinyDelegate
Represents an AMQP message.
Reference about the different metadata can be found on AMQP message properties.
Note that the body is retrieved using body*
method depending on the expected type.
original
non Mutiny-ified interface using Vert.x codegen.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAmqpMessage
(io.vertx.amqp.AmqpMessage delegate) AmqpMessage
(Object delegate) -
Method Summary
Modifier and TypeMethodDescriptionaccepted()
address()
io.vertx.core.json.JsonObject
boolean
byte
char
double
float
int
io.vertx.core.json.JsonArray
io.vertx.core.json.JsonObject
<T> List<T>
long
short
static AmqpMessageBuilder
create()
static AmqpMessageBuilder
create
(AmqpMessage existing) long
int
boolean
long
io.vertx.amqp.AmqpMessage
groupId()
long
int
hashCode()
id()
boolean
boolean
boolean
modified
(boolean deliveryFailed, boolean undeliverableHere) static AmqpMessage
newInstance
(io.vertx.amqp.AmqpMessage arg) int
priority()
rejected()
released()
replyTo()
subject()
toString()
long
ttl()
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
AmqpMessage
public AmqpMessage(io.vertx.amqp.AmqpMessage delegate) -
AmqpMessage
-
-
Method Details
-
getDelegate
public io.vertx.amqp.AmqpMessage getDelegate()- Specified by:
getDelegate
in interfaceMutinyDelegate
- Returns:
- the delegate used by this Mutiny object of generated type
-
toString
-
equals
-
hashCode
public int hashCode() -
create
- Returns:
- a builder to create an
AmqpMessage
.
-
create
- Parameters:
existing
- an existing message, must not benull
.- Returns:
- a builder to create an
AmqpMessage
.
-
isDurable
public boolean isDurable()- Returns:
- whether or not the message is durable.
-
isFirstAcquirer
public boolean isFirstAcquirer()- Returns:
- if
true
, then this message has not been acquired by any other link. Iffalse
, then this message MAY have previously been acquired by another link or links.
-
priority
public int priority()- Returns:
- the relative message priority. Higher numbers indicate higher priority messages. Messages with higher priorities MAY be delivered before those with lower priorities.
-
deliveryCount
public int deliveryCount()- Returns:
- the number of unsuccessful previous attempts to deliver this message. If this value is non-zero it can be taken as an indication that the delivery might be a duplicate. On first delivery, the value is zero. It is incremented upon an outcome being settled at the sender, according to rules defined for each outcome.
-
ttl
public long ttl()- Returns:
- the duration in milliseconds for which the message is to be considered "live".
-
id
- Returns:
- the message id
-
address
- Returns:
- the message address, also named
to
field
-
replyTo
- Returns:
- The address of the node to send replies to, if any.
-
correlationId
- Returns:
- The client-specific id that can be used to mark or identify messages between clients.
-
isBodyNull
public boolean isBodyNull()- Returns:
- whether the body is
null
. This method returnstrue
is the message does not contain a body or if the message contain anull
AMQP value as body.
-
bodyAsBoolean
public boolean bodyAsBoolean()- Returns:
- the boolean value contained in the body. The value must be passed as AMQP value.
-
bodyAsByte
public byte bodyAsByte()- Returns:
- the byte value contained in the body. The value must be passed as AMQP value.
-
bodyAsShort
public short bodyAsShort()- Returns:
- the short value contained in the body. The value must be passed as AMQP value.
-
bodyAsInteger
public int bodyAsInteger()- Returns:
- the integer value contained in the body. The value must be passed as AMQP value.
-
bodyAsLong
public long bodyAsLong()- Returns:
- the long value contained in the body. The value must be passed as AMQP value.
-
bodyAsFloat
public float bodyAsFloat()- Returns:
- the float value contained in the body. The value must be passed as AMQP value.
-
bodyAsDouble
public double bodyAsDouble()- Returns:
- the double value contained in the body. The value must be passed as AMQP value.
-
bodyAsChar
public char bodyAsChar()- Returns:
- the character value contained in the body. The value must be passed as AMQP value.
-
bodyAsBinary
- Returns:
- the bytes contained in the body. The value must be passed as AMQP data.
-
bodyAsString
- Returns:
- the string value contained in the body. The value must be passed as AMQP value.
-
bodyAsSymbol
- Returns:
- the symbol value contained in the body. The value must be passed as AMQP value.
-
bodyAsList
- Returns:
- the list of values contained in the body. The value must be passed as AMQP value.
-
bodyAsJsonObject
public io.vertx.core.json.JsonObject bodyAsJsonObject()- Returns:
- the JSON object contained in the body. The value must be passed as AMQP data.
-
bodyAsJsonArray
public io.vertx.core.json.JsonArray bodyAsJsonArray()- Returns:
- the JSON array contained in the body. The value must be passed as AMQP data.
-
subject
-
contentType
-
contentEncoding
-
expiryTime
public long expiryTime() -
creationTime
public long creationTime() -
groupId
-
replyToGroupId
-
groupSequence
public long groupSequence() -
applicationProperties
public io.vertx.core.json.JsonObject applicationProperties()- Returns:
- the message properties as JSON object.
-
accepted
- Returns:
- the current
AmqpMessage
object
-
rejected
- Returns:
- the current
AmqpMessage
object
-
released
- Returns:
- the current
AmqpMessage
object
-
modified
- Parameters:
deliveryFailed
- passtrue
to increase the failed delivery countundeliverableHere
- passtrue
to prevent re-delivery of this message to the same consumer- Returns:
- the current
AmqpMessage
object
-
bodyAsTimestamp
- Returns:
- the timestamp value contained in the body. The value must be passed as AMQP value.
-
bodyAsUUID
- Returns:
- the UUID value contained in the body. The value must be passed as AMQP value.
-
newInstance
-