org.netbeans.core/2 3.32

org.netbeans.core
Class NbLoaderPool

java.lang.Object
  extended by org.openide.loaders.DataLoaderPool
      extended by org.netbeans.core.NbLoaderPool
All Implemented Interfaces:
PropertyChangeListener, Serializable, Runnable, EventListener, LookupListener, TaskListener

public final class NbLoaderPool
extends DataLoaderPool
implements PropertyChangeListener, Runnable, LookupListener, TaskListener

See Also:
Serialized Form

Constructor Summary
NbLoaderPool()
           
 
Method Summary
static void add(ManifestSection.LoaderSection s)
          Adds new loader when previous and following are specified.
static void beginUpdates()
           
static void endUpdates()
           
static NbLoaderPool getNbLoaderPool()
          Returns the only instance of the loader pool in our system.
static void load()
           
protected  Enumeration<DataLoader> loaders()
          Enumerates all loaders.
 void propertyChange(PropertyChangeEvent ev)
          Listener to property changes.
static boolean remove(DataLoader dl)
          Removes the loader.
 void resultChanged(LookupEvent ev)
           
 void run()
          Called from the request task
static void store()
           
 void taskFinished(Task task)
           
static void waitFinished()
          Allows tests to wait while processing of events is finished.
 
Methods inherited from class org.openide.loaders.DataLoaderPool
addChangeListener, addOperationListener, allLoaders, createWeakOperationListener, factory, findDataObject, findDataObject, fireChangeEvent, firstProducerOf, getDefault, getPreferredLoader, producersOf, removeChangeListener, removeOperationListener, setPreferredLoader, toArray
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NbLoaderPool

public NbLoaderPool()
Method Detail

beginUpdates

public static void beginUpdates()

endUpdates

public static void endUpdates()

waitFinished

public static void waitFinished()
Allows tests to wait while processing of events is finished.


add

public static void add(ManifestSection.LoaderSection s)
                throws Exception
Adds new loader when previous and following are specified. An attempt will be made to (re-)order the loader pool according to specified dependencies.

If a loader of the same class already existed in the pool, that will be removed and replaced with the new one.

Parameters:
s - adds loader section
Throws:
Exception

store

public static void store()
                  throws IOException
Throws:
IOException

load

public static void load()
                 throws IOException
Throws:
IOException

remove

public static boolean remove(DataLoader dl)
Removes the loader. It is only removed from the list but if an DataObject instance created exists it will be still valid.

So the only difference is that when a DataObject is searched for a FileObject this loader will not be taken into account.

The loader pool may be resorted.

Parameters:
dl - data loader to remove
Returns:
true if the loader was registered and false if not

getNbLoaderPool

public static NbLoaderPool getNbLoaderPool()
Returns the only instance of the loader pool in our system. There's no other way to get an instance of this class, loader pool is singleton too.

Returns:
loader pool instance

taskFinished

public void taskFinished(Task task)
Specified by:
taskFinished in interface TaskListener

loaders

protected Enumeration<DataLoader> loaders()
Enumerates all loaders. Loaders are taken from children structure of NbLoaderPool.

Specified by:
loaders in class DataLoaderPool

propertyChange

public void propertyChange(PropertyChangeEvent ev)
Listener to property changes.

Specified by:
propertyChange in interface PropertyChangeListener

run

public void run()
Called from the request task

Specified by:
run in interface Runnable

resultChanged

public void resultChanged(LookupEvent ev)
Specified by:
resultChanged in interface LookupListener

org.netbeans.core/2 3.32

Built on May 22 2012.  |  Portions Copyright 1997-2012 Oracle. All rights reserved.