ucb.util.mailbox
Class SinkBox<Msg extends Serializable>
java.lang.Object
java.rmi.server.RemoteObject
java.rmi.server.RemoteServer
java.rmi.server.UnicastRemoteObject
ucb.util.mailbox.QueuedMailbox<Msg>
ucb.util.mailbox.SinkBox<Msg>
- All Implemented Interfaces:
- Serializable, Remote, Mailbox<Msg>
public class SinkBox<Msg extends Serializable>
- extends QueuedMailbox<Msg>
A Mailbox that throws away all mail (after any forwarding).
- See Also:
- Serialized Form
Method Summary |
|
checkType(Class<T> msgClass)
Returns THIS, assuming that THIS conveys messages of class MSGCLASS. |
static
|
create()
A new SinkBox with no type checking. |
static
|
create(Class<Msg> msgClass)
A new SinkBox for messages of type MSGCLASS. |
protected void |
enqueue(Msg msg)
Place MSG at the end of the message queue. |
Class<Msg> |
messageType()
The (runtime) type of message sent through this box. |
Methods inherited from class ucb.util.mailbox.QueuedMailbox |
capacity, close, close, create, create, deposit, deposit, flush, forward, forwardTo, forwardTo, isClosed, isForwarding, myWait, receive, receive, stopForwarding |
SinkBox
protected SinkBox(Class<Msg> msgClass)
throws RemoteException
- Throws:
RemoteException
create
public static <Msg extends Serializable> SinkBox<Msg> create(Class<Msg> msgClass)
- A new SinkBox for messages of type MSGCLASS.
create
public static <Msg extends Serializable> SinkBox<Msg> create()
- A new SinkBox with no type checking.
enqueue
protected void enqueue(Msg msg)
- Description copied from class:
QueuedMailbox
- Place MSG at the end of the message queue.
- Overrides:
enqueue
in class QueuedMailbox<Msg extends Serializable>
messageType
public Class<Msg> messageType()
- Description copied from interface:
Mailbox
- The (runtime) type of message sent through this box.
- Specified by:
messageType
in interface Mailbox<Msg extends Serializable>
checkType
public <T extends Serializable> Mailbox<T> checkType(Class<T> msgClass)
- Description copied from interface:
Mailbox
- Returns THIS, assuming that THIS conveys messages of class MSGCLASS.
- Specified by:
checkType
in interface Mailbox<Msg extends Serializable>