java.rmi.RemoteQueuedMailbox, Rendezvous, SinkBoxpublic interface Mailbox<Msg extends java.io.Serializable>
extends java.rmi.Remote
| Modifier and Type | Method | Description |
|---|---|---|
int |
capacity() |
The capacity (see interface comment above) of THIS.
|
<T extends java.io.Serializable> |
checkType(java.lang.Class<T> msgClass) |
Returns THIS, assuming that THIS conveys messages of class MSGCLASS.
|
void |
close() |
Short for close (0).
|
void |
close(long millis) |
Performs a flush(MILLIS) and then invalidates THIS for all future
use, deleting all remaining messages.
|
void |
deposit(Msg msg) |
Deposit MSG in this Mailbox.
|
boolean |
deposit(Msg msg,
long millis) |
Deposit MSG in this Mailbox, if this can be done within approximately
MILLIS milliseconds.
|
boolean |
flush(long millis) |
Wait for all queued messages to be received, or MILLIS milliseconds,
whichever comes first.
|
void |
forwardTo(java.util.List<Mailbox<Msg>> boxes) |
Forward copies of all messages (including any already present) to BOXES
in the order received.
|
void |
forwardTo(Mailbox<Msg> box) |
Forward copies of all messages (including any already present) to BOX
in the order received.
|
boolean |
isClosed() |
True iff THIS is closed.
|
boolean |
isForwarding() |
True iff THIS is currently forwarding messages as a result of
forwardTo.
|
java.lang.Class<Msg> |
messageType() |
The (runtime) type of message sent through this box.
|
Msg |
receive() |
Receive the next queued message in this Mailbox.
|
Msg |
receive(long millis) |
Receive the next queued message in this Mailbox, if one is
available within MILLIS milliseconds.
|
void |
stopForwarding() |
Stop forwarding copies of messages.
|
void deposit(Msg msg) throws java.rmi.RemoteException, java.lang.InterruptedException
java.rmi.RemoteExceptionjava.lang.InterruptedExceptionboolean deposit(Msg msg, long millis) throws java.rmi.RemoteException, java.lang.InterruptedException
java.rmi.RemoteExceptionjava.lang.InterruptedExceptionMsg receive() throws java.rmi.RemoteException, java.lang.InterruptedException
java.rmi.RemoteExceptionjava.lang.InterruptedExceptionMsg receive(long millis) throws java.rmi.RemoteException, java.lang.InterruptedException
java.rmi.RemoteExceptionjava.lang.InterruptedExceptionvoid forwardTo(Mailbox<Msg> box) throws java.rmi.RemoteException, java.lang.InterruptedException
java.rmi.RemoteExceptionjava.lang.InterruptedExceptionvoid forwardTo(java.util.List<Mailbox<Msg>> boxes) throws java.rmi.RemoteException, java.lang.InterruptedException
java.rmi.RemoteExceptionjava.lang.InterruptedExceptionvoid stopForwarding()
throws java.rmi.RemoteException
java.rmi.RemoteExceptionboolean flush(long millis)
throws java.rmi.RemoteException,
java.lang.InterruptedException
java.rmi.RemoteExceptionjava.lang.InterruptedExceptionvoid close(long millis)
throws java.rmi.RemoteException,
java.lang.InterruptedException
java.rmi.RemoteExceptionjava.lang.InterruptedExceptionvoid close()
throws java.rmi.RemoteException,
java.lang.InterruptedException
java.rmi.RemoteExceptionjava.lang.InterruptedExceptionboolean isForwarding()
throws java.rmi.RemoteException
java.rmi.RemoteExceptionboolean isClosed()
throws java.rmi.RemoteException
java.rmi.RemoteExceptionint capacity()
throws java.rmi.RemoteException
java.rmi.RemoteExceptionjava.lang.Class<Msg> messageType() throws java.rmi.RemoteException
java.rmi.RemoteException<T extends java.io.Serializable> Mailbox<T> checkType(java.lang.Class<T> msgClass) throws java.rmi.RemoteException
java.rmi.RemoteException