public class MessageImpl<U,V> extends Object implements Message<V>
| Modifier and Type | Field and Description |
|---|---|
protected String |
address |
protected EventBusImpl |
bus |
protected MultiMap |
headers |
protected MessageCodec<U,V> |
messageCodec |
protected V |
receivedBody |
protected String |
replyAddress |
protected boolean |
send |
protected U |
sentBody |
protected Object |
trace |
| Modifier | Constructor and Description |
|---|---|
|
MessageImpl(EventBusImpl bus) |
protected |
MessageImpl(MessageImpl<U,V> other) |
|
MessageImpl(String address,
MultiMap headers,
U sentBody,
MessageCodec<U,V> messageCodec,
boolean send,
EventBusImpl bus) |
| Modifier and Type | Method and Description |
|---|---|
String |
address()
The address the message was sent to
|
V |
body()
The body of the message.
|
MessageCodec<U,V> |
codec() |
MessageImpl<U,V> |
copyBeforeReceive() |
protected MessageImpl |
createReply(Object message,
DeliveryOptions options) |
MultiMap |
headers()
Multi-map of message headers.
|
protected boolean |
isLocal() |
boolean |
isSend()
Signals if this message represents a send or publish event.
|
void |
reply(Object message,
DeliveryOptions options)
Link
Message.reply(Object) but allows you to specify delivery options for the reply. |
String |
replyAddress()
The reply address.
|
<R> Future<Message<R>> |
replyAndRequest(Object message,
DeliveryOptions options)
Like
Message.replyAndRequest(Object, DeliveryOptions, Handler) but returns a Future of the asynchronous result |
void |
setReplyAddress(String replyAddress) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfail, reply, replyAndRequest, replyAndRequest, replyAndRequestprotected MessageCodec<U,V> messageCodec
protected final EventBusImpl bus
protected String address
protected String replyAddress
protected MultiMap headers
protected U sentBody
protected V receivedBody
protected boolean send
protected Object trace
public MessageImpl(EventBusImpl bus)
public MessageImpl(String address, MultiMap headers, U sentBody, MessageCodec<U,V> messageCodec, boolean send, EventBusImpl bus)
protected MessageImpl(MessageImpl<U,V> other)
public MessageImpl<U,V> copyBeforeReceive()
public String address()
Messagepublic MultiMap headers()
Messagepublic V body()
Messagepublic String replyAddress()
MessagereplyAddress in interface Message<V>public void reply(Object message, DeliveryOptions options)
MessageMessage.reply(Object) but allows you to specify delivery options for the reply.public <R> Future<Message<R>> replyAndRequest(Object message, DeliveryOptions options)
MessageMessage.replyAndRequest(Object, DeliveryOptions, Handler) but returns a Future of the asynchronous resultreplyAndRequest in interface Message<V>protected MessageImpl createReply(Object message, DeliveryOptions options)
public boolean isSend()
Messagepublic void setReplyAddress(String replyAddress)
public MessageCodec<U,V> codec()
protected boolean isLocal()
Copyright © 2021. All rights reserved.