|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Cookie that allows connection between two objects. Also supporting persistent connections.
Nested Class Summary | |
static class |
ConnectionCookie.Event
Event that is fired to listeners. |
static interface |
ConnectionCookie.Listener
Cookie that must be provided by a node that is willing to register itself as a listener to a ConnectionCookie. |
static interface |
ConnectionCookie.Type
Interface describing cookie type of event a cookie can produce. |
Method Summary | |
Set |
getTypes()
Unmutable set of types supported by this connection source. |
void |
register(ConnectionCookie.Type type,
Node listener)
Attaches new node to listen to events produced by this event. |
void |
unregister(ConnectionCookie.Type type,
Node listener)
Unregisters an listener. |
Method Detail |
public void register(ConnectionCookie.Type type, Node listener) throws IOException
type
- the type of event, must be supported by the cookielistener
- the node that should be notified
InvalidObjectException
- if the type is not supported by the cookie
IOException
- if the type is persistent and the listener does not
have serializable handle (listener.getHandle () is null or its serialization
throws an exception)public void unregister(ConnectionCookie.Type type, Node listener) throws IOException
type
- type of event to unregister the listener from listening tolistener
- to unregister
IOException
- if there is I/O operation error when the removing
the listener from persistent storagepublic Set getTypes()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |