public interface CompletesEventually extends Stoppable
| Modifier and Type | Method and Description |
|---|---|
Address |
address() |
default void |
conclude()
Concludes the receiver, eventually causing
it to receive a stop() message.
|
default boolean |
isStopped()
Answer whether or not the receiver is stopped.
|
default void |
stop()
Causes the receiver to stop reacting to messages and to eventually
be garbage collected.
|
void |
with(Object outcome) |
Address address()
void with(Object outcome)
default void conclude()
Stoppabledefault boolean isStopped()
Stoppabledefault void stop()
StoppableNote that the contract of stop() is to suspend the receivers mailbox deliveries, which will prevent further processing. To arrange for eventually stopping the receiver send conclude(), which will then cause stop(). In essence the conclude() marks the mailbox for ending operations, but allows messages already queued to first be delivered.
Copyright © 2021. All rights reserved.