com.neeve.ods
Class StoreObjectFactoryRegistry

java.lang.Object
  extended by com.neeve.root.RootObject
      extended by com.neeve.ods.OdsObject
          extended by com.neeve.ods.StoreObjectFactoryRegistry

public final class StoreObjectFactoryRegistry
extends OdsObject

The object factory registry.

The object factory registry, a singleton class, stores references to configured object factories. It loads and instantiates object factories and serves them out by name and id.

Threading:
The object factory registry is safe for concurrent access by multiple threads.

Method Summary
static StoreObjectFactoryRegistry getInstance()
          Get the singleton object factory registry instance.
 IStoreObjectFactory getObjectFactory(short factoryId)
          Get an object factory.
 Set<String> getStoreObjectFactoryNames(Set<String> factories)
          Get the names of the set of registered factories.
 void registerObjectFactory(IStoreObjectFactory factory)
          Register an object factory
 
Methods inherited from class com.neeve.root.RootObject
getChecked, getThreaded, getTracer, setChecked, setTracer
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static final StoreObjectFactoryRegistry getInstance()
Get the singleton object factory registry instance.

Threading:
This method is safe for concurrent access by multiple threads

registerObjectFactory

public final void registerObjectFactory(IStoreObjectFactory factory)
Register an object factory

Parameters:
factory - The object factory to register
Threading:
This method is safe for concurrent access by multiple threads.

This method adds the supplied object factory to the object factory registry. It will replace a factory of the same id if one exists.


getObjectFactory

public final IStoreObjectFactory getObjectFactory(short factoryId)
Get an object factory.

Parameters:
factoryId - The factory's unique identifier.
Threading:
This method is safe for concurrent access by multiple threads.

getStoreObjectFactoryNames

public final Set<String> getStoreObjectFactoryNames(Set<String> factories)
Get the names of the set of registered factories.

Parameters:
factories - The set to add the factory names to.
Returns:
Returns the updated set of factories.
Threading:
This method is safe for concurrent access by multiple threads.


Copyright © 2015 Neeve Research, LLC. All Rights Reserved.