@Deprecated public class ConnectionSupport extends Object implements ConnectionCookie
ConnectionCookie.Event, ConnectionCookie.Listener, ConnectionCookie.Type
Constructor and Description |
---|
ConnectionSupport(MultiDataObject.Entry entry,
ConnectionCookie.Type[] types)
Deprecated.
Creates new connection support for given file entry.
|
Modifier and Type | Method and Description |
---|---|
void |
fireEvent(ConnectionCookie.Event ev)
Deprecated.
Fires info for all listeners of given type.
|
List<ConnectionCookie.Type> |
getRegisteredTypes()
Deprecated.
Get the list of all registered types in every (persistent
or not persistent) connections.
|
Set<ConnectionCookie.Type> |
getTypes()
Deprecated.
Unmutable set of types supported by this connection source.
|
Set |
listenersFor(ConnectionCookie.Type type)
Deprecated.
Obtains a set of all listeners for given type.
|
void |
register(ConnectionCookie.Type type,
Node listener)
Deprecated.
Attaches new node to listen to events produced by this
event.
|
void |
unregister(ConnectionCookie.Type type,
Node listener)
Deprecated.
Unregisters an listener.
|
public ConnectionSupport(MultiDataObject.Entry entry, ConnectionCookie.Type[] types)
entry
- entry to store listener to its extended attributestypes
- a list of event types to supportpublic void register(ConnectionCookie.Type type, Node listener) throws IOException
register
in interface ConnectionCookie
type
- the type of event, must be supported by the cookielistener
- the node that should be notifiedInvalidObjectException
- if the type is not supported by the cookie (subclass of IOException)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
unregister
in interface ConnectionCookie
type
- type of event to unregister the listener from listening tolistener
- to unregisterIOException
- if there is I/O operation error when the removing
the listener from persistent storagepublic Set<ConnectionCookie.Type> getTypes()
getTypes
in interface ConnectionCookie
public List<ConnectionCookie.Type> getRegisteredTypes()
public void fireEvent(ConnectionCookie.Event ev)
ev
- the eventpublic Set listenersFor(ConnectionCookie.Type type)
type
- type of events to test