站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc 5.0.0

ConnectionSupport (NetBeans Loaders API) - NetBeans API Javadoc 5.0.0

 

org.openide.loaders
Class ConnectionSupport

java.lang.Object
  extended byorg.openide.loaders.ConnectionSupport
All Implemented Interfaces:
ConnectionCookie, Node.Cookie

Deprecated. Should no longer be used.

public class ConnectionSupport
extends Object
implements ConnectionCookie

Support implementing ConnectionCookie, that stores listeners in extended attributes of associated entry.


Nested Class Summary
 
Nested classes inherited from class org.openide.cookies.ConnectionCookie
ConnectionCookie.Event, ConnectionCookie.Listener, ConnectionCookie.Type
 
Constructor Summary
ConnectionSupport(MultiDataObject.Entry entry, ConnectionCookie.Type[] types)
          Deprecated. Creates new connection support for given file entry.
 
Method Summary
 void fireEvent(ConnectionCookie.Event ev)
          Deprecated. Fires info for all listeners of given type.
 List getRegisteredTypes()
          Deprecated. Get the list of all registered types in every (persistent or not persistent) connections.
 Set 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConnectionSupport

public ConnectionSupport(MultiDataObject.Entry entry,
                         ConnectionCookie.Type[] types)
Deprecated. 
Creates new connection support for given file entry.

Parameters:
entry - entry to store listener to its extended attributes
types - a list of event types to support
Method Detail

register

public void register(ConnectionCookie.Type type,
                     Node listener)
              throws IOException
Deprecated. 
Attaches new node to listen to events produced by this event. The type must be one of event types supported by this cookie and the listener should have ConnectionCookie.Listener cookie attached so it can be notified when event of requested type occurs.

Specified by:
register in interface ConnectionCookie
Parameters:
type - the type of event, must be supported by the cookie
listener - the node that should be notified
Throws:
InvalidObjectException - 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)

unregister

public void unregister(ConnectionCookie.Type type,
                       Node listener)
                throws IOException
Deprecated. 
Unregisters an listener.

Specified by:
unregister in interface ConnectionCookie
Parameters:
type - type of event to unregister the listener from listening to
listener - to unregister
Throws:
IOException - if there is I/O operation error when the removing the listener from persistent storage

getTypes

public Set getTypes()
Deprecated. 
Unmutable set of types supported by this connection source.

Specified by:
getTypes in interface ConnectionCookie
Returns:
a set of Type objects

getRegisteredTypes

public List getRegisteredTypes()
Deprecated. 
Get the list of all registered types in every (persistent or not persistent) connections.

Returns:
the list of ConnectionCookie.Type objects

fireEvent

public void fireEvent(ConnectionCookie.Event ev)
Deprecated. 
Fires info for all listeners of given type.

Parameters:
ev - the event

listenersFor

public Set listenersFor(ConnectionCookie.Type type)
Deprecated. 
Obtains a set of all listeners for given type.

Parameters:
type - type of events to test
Returns:
unmutable set of all listeners (Node) for a type

 

Built on May 3 2007.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.