Package 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>
A Mailbox that throws away all mail (after any forwarding).
- See Also:
-
Field Summary
Fields inherited from class ucb.util.mailbox.QueuedMailbox
capacity, depositBlocks, open, queue
Fields inherited from class java.rmi.server.RemoteObject
ref
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<T extends Serializable>
Mailbox<T>Returns THIS, assuming that THIS conveys messages of class MSGCLASS.static <Msg extends Serializable>
SinkBox<Msg>create()
A new SinkBox with no type checking.static <Msg extends Serializable>
SinkBox<Msg>A new SinkBox for messages of type MSGCLASS.protected void
Place MSG at the end of the message queue.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
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, exportObject, exportObject, unexportObject
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
-
Constructor Details
-
SinkBox
- Throws:
RemoteException
-
-
Method Details
-
create
A new SinkBox for messages of type MSGCLASS. -
create
A new SinkBox with no type checking. -
enqueue
Description copied from class:QueuedMailbox
Place MSG at the end of the message queue.- Overrides:
enqueue
in classQueuedMailbox<Msg extends Serializable>
-
messageType
Description copied from interface:Mailbox
The (runtime) type of message sent through this box.- Specified by:
messageType
in interfaceMailbox<Msg extends Serializable>
-
checkType
Description copied from interface:Mailbox
Returns THIS, assuming that THIS conveys messages of class MSGCLASS.- Specified by:
checkType
in interfaceMailbox<Msg extends Serializable>
-