|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--java.rmi.server.RemoteObject
|
+--java.rmi.server.RemoteServer
|
+--java.rmi.server.UnicastRemoteObject
|
+--ucb.util.mailbox.QueuedMailbox
A Mailbox with a specified (positive) capacity.
| Fields inherited from class java.rmi.server.RemoteObject |
ref |
| Constructor Summary | |
QueuedMailbox(int capacity)
A QueuedMailbox with capacity () fixed at CAPACITY that retains messages for receipt. |
|
QueuedMailbox(int capacity,
boolean retain)
A QueuedMailbox with capacity () fixed at CAPACITY and retains () fixed at RETAIN. |
|
| Method Summary | |
int |
capacity()
The capacity (as defined in the documentation for Mailbox) of THIS. |
void |
close()
Delete any pending messages and then invalidate this Mailbox, so that further use causes an exception. |
int |
concurrency()
The degree of concurrency for forwarding (0). |
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.rmi.server.UnicastRemoteObject |
clone, exportObject, exportObject, exportObject, unexportObject |
| Methods inherited from class java.rmi.server.RemoteServer |
getClientHost, getLog, setLog |
| Methods inherited from class java.rmi.server.RemoteObject |
equals, getRef, hashCode, toString, toStub |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public QueuedMailbox(int capacity,
boolean retain)
throws java.rmi.RemoteException
public QueuedMailbox(int capacity)
throws java.rmi.RemoteException
| Method Detail |
public void deposit(java.io.Serializable msg)
throws java.rmi.RemoteException,
java.lang.InterruptedException
deposit in interface Mailbox
public boolean depositIfPossible(java.io.Serializable msg)
throws java.rmi.RemoteException,
java.lang.InterruptedException
depositIfPossible in interface Mailbox
public java.io.Serializable receive()
throws java.lang.InterruptedException
receive in interface Mailbox
public java.io.Serializable receiveIfPossible()
throws java.lang.InterruptedException
receiveIfPossible in interface Mailbox
public void forwardTo(Mailbox box,
boolean forwardCurrent)
throws java.rmi.RemoteException,
java.lang.InterruptedException
forwardTo in interface Mailboxpublic void stopForwardingTo(Mailbox box)
stopForwardingTo in interface Mailbox
public void flush()
throws java.rmi.RemoteException,
java.lang.InterruptedException
flush in interface Mailboxpublic void close()
close in interface Mailboxpublic boolean retains()
retains in interface Mailboxpublic int capacity()
capacity in interface Mailboxpublic int concurrency()
concurrency in interface Mailbox
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||