
public final class FutureReply extends Object implements EventReply
Future but without
cancellation, exception completion or ExecutionException, but with the additional
restriction that put() may be called at most once per instance. Thread-safe.| Constructor and Description |
|---|
FutureReply()
Construct.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getMessage()
Gets a short string describing the acceptance or rejection.
|
void |
put(EventReply value)
Posts a reply using an
EventReply as the source of the message text. |
String |
toString()
Gets the string form of the response.
|
boolean |
wasAccepted()
Gets a boolean flag, blocking if need be, which tells whether an event was accepted.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitacceptedpublic boolean wasAccepted()
throws InterruptedException
EventReplywasAccepted in interface EventReplyInterruptedExceptionEventReply.getMessage()public String getMessage()
EventReplygetMessage in interface EventReplyIllegalStateException - if wasAccepted() wasn't called.#put(java.lang.String)public void put(EventReply value)
EventReply as the source of the message text.value - The source of the message text.IllegalStateException - if put() has already been called for this instance.NullPointerException - if the argument is null.#get()Copyright © 2019 LSST. All rights reserved.