Constructor and Description |
---|
MessageImpl() |
MessageImpl(ServerID sender,
String address,
String replyAddress,
MultiMap headers,
U sentBody,
MessageCodec<U,V> messageCodec,
boolean send) |
Modifier and Type | Method and Description |
---|---|
String |
address()
The address the message was sent to
|
V |
body()
The body of the message.
|
protected MessageCodec |
codec() |
MessageImpl<U,V> |
copyBeforeReceive() |
Buffer |
encodeToWire() |
void |
fail(int failureCode,
String message)
Signal to the sender that processing of this message failed.
|
MultiMap |
headers()
Multi-map of message headers.
|
void |
readFromWire(NetSocket socket,
Buffer buffer,
Map<String,MessageCodec> codecMap,
MessageCodec[] systemCodecs) |
void |
reply(Object message)
Reply to this message.
|
void |
reply(Object message,
DeliveryOptions options)
Link
Message.reply(Object) but allows you to specify delivery options for the reply. |
<R> void |
reply(Object message,
DeliveryOptions options,
Handler<AsyncResult<Message<R>>> replyHandler)
The same as
reply(R message, DeliveryOptions) but you can specify handler for the reply - i.e. |
<R> void |
reply(Object message,
Handler<AsyncResult<Message<R>>> replyHandler)
The same as
reply(R message) but you can specify handler for the reply - i.e. |
String |
replyAddress()
The reply address.
|
protected boolean |
send() |
protected void |
setBus(EventBusImpl eventBus) |
protected void |
setReplyAddress(String replyAddress) |
public MessageImpl<U,V> copyBeforeReceive()
public String address()
Message
public MultiMap headers()
Message
public V body()
Message
public String replyAddress()
Message
replyAddress
in interface Message<V>
public Buffer encodeToWire()
public void readFromWire(NetSocket socket, Buffer buffer, Map<String,MessageCodec> codecMap, MessageCodec[] systemCodecs)
public void fail(int failureCode, String message)
Message
If the message was sent specifying a result handler the handler will be called with a failure corresponding to the failure code and message specified here.
public void reply(Object message)
Message
If the message was sent specifying a reply handler, that handler will be called when it has received a reply. If the message wasn't sent specifying a receipt handler this method does nothing.
public <R> void reply(Object message, Handler<AsyncResult<Message<R>>> replyHandler)
Message
reply(R message)
but you can specify handler for the reply - i.e.
to receive the reply to the reply.public void reply(Object message, DeliveryOptions options)
Message
Message.reply(Object)
but allows you to specify delivery options for the reply.public <R> void reply(Object message, DeliveryOptions options, Handler<AsyncResult<Message<R>>> replyHandler)
Message
reply(R message, DeliveryOptions)
but you can specify handler for the reply - i.e.
to receive the reply to the reply.protected void setReplyAddress(String replyAddress)
protected boolean send()
protected void setBus(EventBusImpl eventBus)
protected MessageCodec codec()
Copyright © 2015. All Rights Reserved.