R - the reply typepublic final class ConversationReply<R extends ConversationMessage> extends Object
ConversationChannel.| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
Promise<R> |
getReply()
Gets the reply.
|
int |
hashCode() |
boolean |
hasReply()
Gets if this object actually contains a reply.
|
static <R extends ConversationMessage> |
noReply()
Returns an object indicating that no reply should be sent.
|
static <R extends ConversationMessage> |
of(R reply)
Creates a new
ConversationReply. |
static <R extends ConversationMessage> |
ofCompletableFuture(CompletableFuture<R> futureReply)
Creates a new
ConversationReply. |
static <R extends ConversationMessage> |
ofPromise(Promise<R> promiseReply)
Creates a new
ConversationReply. |
String |
toString() |
public static <R extends ConversationMessage> ConversationReply<R> noReply()
R - the reply typepublic static <R extends ConversationMessage> ConversationReply<R> of(R reply)
ConversationReply.R - the typereply - the reply messagepublic static <R extends ConversationMessage> ConversationReply<R> ofCompletableFuture(CompletableFuture<R> futureReply)
ConversationReply.
Bear in mind the reply will only be send once the future completes. The timeout value on "other other end" may need to take this into account.
R - the typefutureReply - the future replypublic static <R extends ConversationMessage> ConversationReply<R> ofPromise(Promise<R> promiseReply)
ConversationReply.
Bear in mind the reply will only be send once the future completes. The timeout value on "other other end" may need to take this into account.
R - the typepromiseReply - the future replypublic boolean hasReply()
@Nonnull public Promise<R> getReply()
IllegalStateException - if this object doesn't have a replyCopyright © 2020. All rights reserved.