|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--ucb.util.mailbox.SimpleMailbox
A filter on Mailboxes that turns all InterruptedException and RemoteExceptions into RuntimeExceptions (MailboxExceptions). Although this indirectly implements the Remote interface, it cannot be made into a remote class, because its methods do not mention RemoteException in their throws clauses.
| Field Summary | |
Mailbox |
box
The Mailbox being filtered (argument to the constructor). |
| Constructor Summary | |
SimpleMailbox(Mailbox box)
|
|
| Method Summary | |
int |
capacity()
The capacity (see interface comment above) of THIS. |
void |
close()
Flush any pending messages and then invalidate this Mailbox, so that further use causes an exception. |
int |
concurrency()
The level of concurrency for forwarding mail. |
void |
deposit(java.io.Serializable msg)
Deposit MSG in this Mailbox. |
boolean |
depositIfPossible(java.io.Serializable msg)
Deposit MSG in this Mailbox, if it is not full. |
void |
flush()
Wait until all pending messages have been received. |
void |
forwardTo(Mailbox box,
boolean forwardCurrent)
Begin forwarding copies of all messages to BOX in the order received. |
java.io.Serializable |
receive()
Receive the next queued message in this Mailbox. |
java.io.Serializable |
receiveIfPossible()
Receive the next queued message in this Mailbox, if one is immediately available. |
boolean |
retains()
True iff this Mailbox retains messages sent to it for later receipt. |
void |
stopForwardingTo(Mailbox box)
Stop forwarding copies of messages to BOX. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public final Mailbox box
| Constructor Detail |
public SimpleMailbox(Mailbox box)
| Method Detail |
public void deposit(java.io.Serializable msg)
deposit in interface Mailboxpublic boolean depositIfPossible(java.io.Serializable msg)
depositIfPossible in interface Mailboxpublic java.io.Serializable receive()
receive in interface Mailboxpublic java.io.Serializable receiveIfPossible()
receiveIfPossible in interface Mailbox
public void forwardTo(Mailbox box,
boolean forwardCurrent)
forwardTo in interface Mailboxpublic void stopForwardingTo(Mailbox box)
stopForwardingTo in interface Mailboxpublic void flush()
flush in interface Mailboxpublic void close()
close in interface Mailboxpublic boolean retains()
retains in interface Mailboxpublic int concurrency()
concurrency in interface Mailboxpublic int capacity()
capacity in interface Mailbox
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||