Exceptional, Paused, Stopping| Constructor and Description |
|---|
ResumingMailbox(Message message) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close me.
|
int |
concurrencyCapacity()
Answer the total capacity for concurrent operations.
|
boolean |
isClosed()
Answer whether or not I am closed.
|
boolean |
isDelivering()
Answer whether or not I am currently delivering a message.
|
boolean |
isSuspended()
Answer whether or not I am currently suspended.
|
int |
pendingMessages()
Answer the count of messages that have not yet been delivered.
|
Message |
receive()
Answer the next
Message that can be received. |
void |
resume(String name)
Recovers the previous operational mode, either active or suspended,
and if active resumes delivery.
|
void |
run() |
void |
send(Message message)
Arrange for
Message to be sent, which will generally
be delivered by another thread. |
void |
suspendExceptFor(String name,
Class<?>... overrides)
Suspend message deliver but allow any of the given
overrides
to pass through, essentially giving these priority. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisPreallocated, isSuspendedFor, sendpublic ResumingMailbox(Message message)
public void close()
Mailboxpublic boolean isClosed()
Mailboxpublic boolean isDelivering()
MailboxisDelivering in interface Mailboxpublic int concurrencyCapacity()
MailboxconcurrencyCapacity in interface Mailboxpublic void resume(String name)
Mailboxresume() is required.
If the name is not the current suspended mode, its corresponding
overrides may be marked for removal after any later overrides are removed.public void send(Message message)
MailboxMessage to be sent, which will generally
be delivered by another thread. Exceptions to this rule are
for possible, such as for TestMailbox.public void suspendExceptFor(String name, Class<?>... overrides)
Mailboxoverrides
to pass through, essentially giving these priority. Note that the
receiving Actor must use resume() to cause normally delivery
when it is ready.
NOTE: If suspendExceptFor(overrides) is used multiple times before
the implementing Mailbox is resumed, the outcome is implementation
dependent. The implementor may accumulate or replace its internal
overrides with the overrides parameter. The name may be helpful
in maintaining accumulated overrides.
suspendExceptFor in interface Mailboxname - String the name of the specific overrideoverrides - the varargs Class<?> that are allowed to be delivered although others are suspendedpublic boolean isSuspended()
MailboxisSuspended in interface Mailboxpublic Message receive()
MailboxMessage that can be received.public int pendingMessages()
MailboxpendingMessages in interface MailboxCopyright © 2021. All rights reserved.