Class SpringWebMvcProcedureRegistry
- java.lang.Object
-
- net.officefloor.spring.webmvc.procedure.SpringWebMvcProcedureRegistry
-
- All Implemented Interfaces:
ServiceFactory<SpringSupplierExtension>,SpringSupplierExtension,SpringSupplierExtensionServiceFactory
public class SpringWebMvcProcedureRegistry extends java.lang.Object implements SpringSupplierExtensionServiceFactory, SpringSupplierExtension
- Author:
- Daniel Sagenschneider
-
-
Constructor Summary
Constructors Constructor Description SpringWebMvcProcedureRegistry()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterSpringLoad(AfterSpringLoadSupplierExtensionContext context)Invoked after Spring is loaded.SpringSupplierExtensioncreateService(ServiceContext context)Creates the service.static voidextractEndPointMethods(java.lang.Class<?> controllerClass, java.util.function.Consumer<java.lang.reflect.Method> methodVisitor)Extract theRequestMappingMethodinstances.static org.springframework.web.servlet.HandlerExecutionChaingetHandler(java.lang.Class<?> controllerClass, java.lang.reflect.Method controllerMethod, java.lang.ClassLoader classLoader, org.springframework.context.ConfigurableApplicationContext springContext)Obtains theHandlerExecutionChainfor theControllerMethod.static org.springframework.web.servlet.HandlerExecutionChaingetHandler(java.lang.Class<?> controllerClass, java.lang.String controllerMethodName, java.lang.ClassLoader classLoader, org.springframework.context.ConfigurableApplicationContext springContext)Obtains theHandlerExecutionChainfor theControllerMethod.static voidregisterSpringControllerProcedure(SpringWebMvcProcedure procedure)Registers aSpringWebMvcProcedure.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.officefloor.spring.extension.SpringSupplierExtension
beforeSpringLoad, configureSpring, decorateSpringBean
-
-
-
-
Method Detail
-
registerSpringControllerProcedure
public static void registerSpringControllerProcedure(SpringWebMvcProcedure procedure)
Registers aSpringWebMvcProcedure.- Parameters:
procedure-SpringWebMvcProcedure.
-
extractEndPointMethods
public static void extractEndPointMethods(java.lang.Class<?> controllerClass, java.util.function.Consumer<java.lang.reflect.Method> methodVisitor)Extract theRequestMappingMethodinstances.- Parameters:
controllerClass-Classthat may beController.methodVisitor- Receives extractRequestMappingMethodinstances.
-
getHandler
public static org.springframework.web.servlet.HandlerExecutionChain getHandler(java.lang.Class<?> controllerClass, java.lang.String controllerMethodName, java.lang.ClassLoader classLoader, org.springframework.context.ConfigurableApplicationContext springContext) throws java.lang.ExceptionObtains theHandlerExecutionChainfor theControllerMethod.- Parameters:
controllerClass-ControllerClass.controllerMethodName- Name of theControllerMethod.classLoader-ClassLoader.springContext-ConfigurableApplicationContext.- Returns:
HandlerExecutionChainfor theControllerMethod.nullif not found.- Throws:
java.lang.Exception- If fails to obtain theHandlerExecutionChain.
-
getHandler
public static org.springframework.web.servlet.HandlerExecutionChain getHandler(java.lang.Class<?> controllerClass, java.lang.reflect.Method controllerMethod, java.lang.ClassLoader classLoader, org.springframework.context.ConfigurableApplicationContext springContext) throws java.lang.ExceptionObtains theHandlerExecutionChainfor theControllerMethod.- Parameters:
controllerClass-ControllerClass.controllerMethod-ControllerMethod.classLoader-ClassLoader.springContext-ConfigurableApplicationContext.- Returns:
HandlerExecutionChainfor theControllerMethod.nullif not found.- Throws:
java.lang.Exception- If fails to obtain theHandlerExecutionChain.
-
createService
public SpringSupplierExtension createService(ServiceContext context) throws java.lang.Throwable
Description copied from interface:ServiceFactoryCreates the service.- Specified by:
createServicein interfaceServiceFactory<SpringSupplierExtension>- Parameters:
context-ServiceContext.- Returns:
- Service.
- Throws:
java.lang.Throwable- If fails to create the service.
-
afterSpringLoad
public void afterSpringLoad(AfterSpringLoadSupplierExtensionContext context) throws java.lang.Exception
Description copied from interface:SpringSupplierExtensionInvoked after Spring is loaded.
Allows processing captured information.
- Specified by:
afterSpringLoadin interfaceSpringSupplierExtension- Parameters:
context-AfterSpringLoadSupplierExtensionContext.- Throws:
java.lang.Exception- If fails to complete extension configuration.
-
-