T - message typepublic interface MessageSender<T>
MessageListener with some defined semantics.| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the connection.
|
<U> CompletableFuture<U> |
request(T message)
Send a message to corresponding
MessageListener.onMessageWithContext(T, edu.snu.coral.runtime.common.message.MessageContext) and return
a reply message. |
void |
send(T message)
Send a message to corresponding
MessageListener.onMessage(T). |
void send(T message)
MessageListener.onMessage(T). It does not guarantee whether
the message is sent successfully or not.message - a message<U> CompletableFuture<U> request(T message)
MessageListener.onMessageWithContext(T, edu.snu.coral.runtime.common.message.MessageContext) and return
a reply message. If there was an exception, the returned future would be failed.U - reply message type.message - a messageCopyright © 2018. All rights reserved.