R - the reply typepublic interface ConversationReplyListener<R extends ConversationMessage>
| Modifier and Type | Interface and Description |
|---|---|
static class |
ConversationReplyListener.RegistrationAction
Defines the actions to take after receiving a reply in a
ConversationReplyListener. |
| Modifier and Type | Method and Description |
|---|---|
static <R extends ConversationMessage> |
of(Function<? super R,ConversationReplyListener.RegistrationAction> onReply) |
ConversationReplyListener.RegistrationAction |
onReply(R reply)
Called when a message is posted to this listener.
|
void |
onTimeout(List<R> replies)
Called when the listener times out.
|
static <R extends ConversationMessage> ConversationReplyListener<R> of(Function<? super R,ConversationReplyListener.RegistrationAction> onReply)
@Nonnull ConversationReplyListener.RegistrationAction onReply(@Nonnull R reply)
This method is called asynchronously.
reply - the reply messagevoid onTimeout(@Nonnull List<R> replies)
A listener times out if the "timeout wait period" passes before the listener is unregistered by other means.
"unregistered by other means" refers to the listener being stopped after a message was
passed to onReply(ConversationMessage) and ConversationReplyListener.RegistrationAction.STOP_LISTENING being
returned.
replies - the replies which have been receivedCopyright © 2020. All rights reserved.