net.officefloor.autowire.impl
Class SingletonManagedObjectSource

java.lang.Object
  extended by net.officefloor.frame.spi.managedobject.source.impl.AbstractAsyncManagedObjectSource<D,F>
      extended by net.officefloor.frame.spi.managedobject.source.impl.AbstractManagedObjectSource<None,None>
          extended by net.officefloor.autowire.impl.SingletonManagedObjectSource
All Implemented Interfaces:
ExtensionInterfaceFactory<Object>, ManagedObject, ManagedObjectSource<None,None>

public class SingletonManagedObjectSource
extends AbstractManagedObjectSource<None,None>
implements ManagedObject, ExtensionInterfaceFactory<Object>

Provides a singleton object.

Author:
Daniel Sagenschneider

Nested Class Summary
 
Nested classes/interfaces inherited from class net.officefloor.frame.spi.managedobject.source.impl.AbstractAsyncManagedObjectSource
AbstractAsyncManagedObjectSource.DependencyLabeller, AbstractAsyncManagedObjectSource.Labeller, AbstractAsyncManagedObjectSource.MetaDataContext<D extends Enum<D>,F extends Enum<F>>, AbstractAsyncManagedObjectSource.SpecificationContext
 
Constructor Summary
SingletonManagedObjectSource(Object object)
          Initiate.
 
Method Summary
 Object createExtensionInterface(ManagedObject managedObject)
          Creates the specific extension interface for the ManagedObject.
protected  ManagedObject getManagedObject()
          Synchronously obtains the ManagedObject.
 Object getObject()
          Obtains the object being managed.
protected  void loadMetaData(AbstractAsyncManagedObjectSource.MetaDataContext<None,None> context)
          Overridden to load meta-data.
protected  void loadSpecification(AbstractAsyncManagedObjectSource.SpecificationContext context)
          Overridden to load specifications.
 
Methods inherited from class net.officefloor.frame.spi.managedobject.source.impl.AbstractManagedObjectSource
sourceManagedObject
 
Methods inherited from class net.officefloor.frame.spi.managedobject.source.impl.AbstractAsyncManagedObjectSource
getMetaData, getSpecification, init, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SingletonManagedObjectSource

public SingletonManagedObjectSource(Object object)
Initiate.

Parameters:
object - Singleton object.
Method Detail

loadSpecification

protected void loadSpecification(AbstractAsyncManagedObjectSource.SpecificationContext context)
Description copied from class: AbstractAsyncManagedObjectSource
Overridden to load specifications.

Specified by:
loadSpecification in class AbstractAsyncManagedObjectSource<None,None>
Parameters:
context - Specifications.

loadMetaData

protected void loadMetaData(AbstractAsyncManagedObjectSource.MetaDataContext<None,None> context)
                     throws Exception
Description copied from class: AbstractAsyncManagedObjectSource
Overridden to load meta-data.

Specified by:
loadMetaData in class AbstractAsyncManagedObjectSource<None,None>
Parameters:
context - Meta-data.
Throws:
Exception - If fails to load the meta-data.

getManagedObject

protected ManagedObject getManagedObject()
Description copied from class: AbstractManagedObjectSource
Synchronously obtains the ManagedObject.

Specified by:
getManagedObject in class AbstractManagedObjectSource<None,None>
Returns:
ManagedObject.

getObject

public Object getObject()
Description copied from interface: ManagedObject
Obtains the object being managed.

Specified by:
getObject in interface ManagedObject
Returns:
Object being managed.

createExtensionInterface

public Object createExtensionInterface(ManagedObject managedObject)
Description copied from interface: ExtensionInterfaceFactory
Creates the specific extension interface for the ManagedObject.

Specified by:
createExtensionInterface in interface ExtensionInterfaceFactory<Object>
Parameters:
managedObject - ManagedObject that is have the extension interface created for it.
Returns:
Extension interface for the input ManagedObject.


Copyright © 2005-2013. All Rights Reserved.