Package net.officefloor.gef.woof.test
Class ManualProcedureSourceServiceFactory
- java.lang.Object
-
- net.officefloor.gef.woof.test.ManualProcedureSourceServiceFactory
-
- All Implemented Interfaces:
ProcedureSource,ProcedureSourceServiceFactory,ServiceFactory<ProcedureSource>
public class ManualProcedureSourceServiceFactory extends java.lang.Object implements ProcedureSourceServiceFactory, ProcedureSource
ManualProcedureSourceServiceFactory.- Author:
- Daniel Sagenschneider
-
-
Constructor Summary
Constructors Constructor Description ManualProcedureSourceServiceFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ProcedureSourcecreateService(ServiceContext context)Creates the service.java.lang.StringgetSourceName()Name of this source.voidlistProcedures(ProcedureListContext context)Provides the availableProcedureinstances for the resource.java.lang.reflect.MethodloadMethod(ProcedureMethodContext context)Loads theMethodfor theProcedure.static voidprocedure()
-
-
-
Method Detail
-
procedure
public static void procedure()
-
createService
public ProcedureSource createService(ServiceContext context) throws java.lang.Throwable
Description copied from interface:ServiceFactoryCreates the service.- Specified by:
createServicein interfaceServiceFactory<ProcedureSource>- Parameters:
context-ServiceContext.- Returns:
- Service.
- Throws:
java.lang.Throwable- If fails to create the service.
-
getSourceName
public java.lang.String getSourceName()
Description copied from interface:ProcedureSourceName of this source.
Note that this is the name used in configuration to identify this
ProcedureSource. Therefore, it can not change without causing configurations to be updated.The reasons for using this logical name over
Classnames is:- Class names can be quite long
- Class names are not easily readable
- Enables swapping plugins for same logical service name
- Specified by:
getSourceNamein interfaceProcedureSource- Returns:
- Name of this source.
-
listProcedures
public void listProcedures(ProcedureListContext context) throws java.lang.Exception
Description copied from interface:ProcedureSourceProvides the availableProcedureinstances for the resource.- Specified by:
listProceduresin interfaceProcedureSource- Parameters:
context-ProcedureListContext.- Throws:
java.lang.Exception- If fails to listProcedureinstances.
-
loadMethod
public java.lang.reflect.Method loadMethod(ProcedureMethodContext context) throws java.lang.Exception
Description copied from interface:ProcedureSourceLoads theMethodfor theProcedure.- Specified by:
loadMethodin interfaceProcedureSource- Parameters:
context-ProcedureMethodContext.- Returns:
Methodfor theProcedureSource.- Throws:
java.lang.Exception- If fails to load the method.
-
-