Class ClassManagedObjectSource
- java.lang.Object
-
- net.officefloor.frame.api.managedobject.source.impl.AbstractAsyncManagedObjectSource<O,F>
-
- net.officefloor.frame.api.managedobject.source.impl.AbstractManagedObjectSource<Indexed,Indexed>
-
- net.officefloor.plugin.managedobject.clazz.ClassManagedObjectSource
-
- All Implemented Interfaces:
ManagedObjectSourceService<Indexed,Indexed,ClassManagedObjectSource>,ManagedObjectSourceServiceFactory,ManagedObjectSource<Indexed,Indexed>,ServiceFactory<ManagedObjectSourceService<?,?,?>>
public class ClassManagedObjectSource extends AbstractManagedObjectSource<Indexed,Indexed> implements ManagedObjectSourceService<Indexed,Indexed,ClassManagedObjectSource>, ManagedObjectSourceServiceFactory
ManagedObjectSourcethat manages anObjectvia reflection.- Author:
- Daniel Sagenschneider
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.officefloor.frame.api.managedobject.source.impl.AbstractAsyncManagedObjectSource
AbstractAsyncManagedObjectSource.DependencyLabeller<K extends java.lang.Enum<K>>, AbstractAsyncManagedObjectSource.ExecutionLabeller, AbstractAsyncManagedObjectSource.Labeller<K extends java.lang.Enum<K>>, AbstractAsyncManagedObjectSource.MetaDataContext<O extends java.lang.Enum<O>,F extends java.lang.Enum<F>>, AbstractAsyncManagedObjectSource.SpecificationContext
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCLASS_NAME_PROPERTY_NAMEProperty name providing theClassname.
-
Constructor Summary
Constructors Constructor Description ClassManagedObjectSource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ManagedObjectSourceService<?,?,?>createService(ServiceContext context)Creates the service.protected ManagedObjectgetManagedObject()Synchronously obtains theManagedObject.java.lang.StringgetManagedObjectSourceAlias()Obtains the alias for theManagedObjectSourceClass.java.lang.Class<ClassManagedObjectSource>getManagedObjectSourceClass()Obtains theManagedObjectSourceClass.protected voidloadMetaData(AbstractAsyncManagedObjectSource.MetaDataContext<Indexed,Indexed> context)Overridden to load meta-data.protected voidloadSpecification(AbstractAsyncManagedObjectSource.SpecificationContext context)Overridden to load specifications.voidstart(ManagedObjectExecuteContext<Indexed> context)Called once afterManagedObjectSource.init(ManagedObjectSourceContext)to indicate thisManagedObjectSourceshould start execution.-
Methods inherited from class net.officefloor.frame.api.managedobject.source.impl.AbstractManagedObjectSource
sourceManagedObject
-
Methods inherited from class net.officefloor.frame.api.managedobject.source.impl.AbstractAsyncManagedObjectSource
getSpecification, init, stop
-
-
-
-
Field Detail
-
CLASS_NAME_PROPERTY_NAME
public static final java.lang.String CLASS_NAME_PROPERTY_NAME
Property name providing theClassname.- See Also:
- Constant Field Values
-
-
Method Detail
-
createService
public ManagedObjectSourceService<?,?,?> createService(ServiceContext context) throws java.lang.Throwable
Description copied from interface:ServiceFactoryCreates the service.- Specified by:
createServicein interfaceServiceFactory<ManagedObjectSourceService<?,?,?>>- Parameters:
context-ServiceContext.- Returns:
- Service.
- Throws:
java.lang.Throwable- If fails to create the service.
-
getManagedObjectSourceAlias
public java.lang.String getManagedObjectSourceAlias()
Description copied from interface:ManagedObjectSourceServiceObtains the alias for theManagedObjectSourceClass.- Specified by:
getManagedObjectSourceAliasin interfaceManagedObjectSourceService<Indexed,Indexed,ClassManagedObjectSource>- Returns:
- Alias for the
ManagedObjectSourceClass.
-
getManagedObjectSourceClass
public java.lang.Class<ClassManagedObjectSource> getManagedObjectSourceClass()
Description copied from interface:ManagedObjectSourceServiceObtains theManagedObjectSourceClass.- Specified by:
getManagedObjectSourceClassin interfaceManagedObjectSourceService<Indexed,Indexed,ClassManagedObjectSource>- Returns:
ManagedObjectSourceClass.
-
loadSpecification
protected void loadSpecification(AbstractAsyncManagedObjectSource.SpecificationContext context)
Description copied from class:AbstractAsyncManagedObjectSourceOverridden to load specifications.- Specified by:
loadSpecificationin classAbstractAsyncManagedObjectSource<Indexed,Indexed>- Parameters:
context- Specifications.
-
loadMetaData
protected void loadMetaData(AbstractAsyncManagedObjectSource.MetaDataContext<Indexed,Indexed> context) throws java.lang.Exception
Description copied from class:AbstractAsyncManagedObjectSourceOverridden to load meta-data.- Specified by:
loadMetaDatain classAbstractAsyncManagedObjectSource<Indexed,Indexed>- Parameters:
context- Meta-data.- Throws:
java.lang.Exception- If fails to load the meta-data.
-
start
public void start(ManagedObjectExecuteContext<Indexed> context) throws java.lang.Exception
Description copied from interface:ManagedObjectSourceCalled once after
ManagedObjectSource.init(ManagedObjectSourceContext)to indicate thisManagedObjectSourceshould start execution.On invocation of this method,
ProcessStateinstances may be invoked via theManagedObjectExecuteContext.- Specified by:
startin interfaceManagedObjectSource<Indexed,Indexed>- Overrides:
startin classAbstractAsyncManagedObjectSource<Indexed,Indexed>- Parameters:
context-ManagedObjectExecuteContextto use in starting thisManagedObjectSource.- Throws:
java.lang.Exception- Should theManagedObjectSourcefail to start execution.
-
getManagedObject
protected ManagedObject getManagedObject() throws java.lang.Throwable
Description copied from class:AbstractManagedObjectSourceSynchronously obtains theManagedObject.- Specified by:
getManagedObjectin classAbstractManagedObjectSource<Indexed,Indexed>- Returns:
ManagedObject.- Throws:
java.lang.Throwable- If fails to obtain theManagedObject.
-
-