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 void
afterSpringLoad(AfterSpringLoadSupplierExtensionContext context)
Invoked after Spring is loaded.SpringSupplierExtension
createService(ServiceContext context)
Creates the service.static void
extractEndPointMethods(java.lang.Class<?> controllerClass, java.util.function.Consumer<java.lang.reflect.Method> methodVisitor)
Extract theRequestMapping
Method
instances.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)
Obtains theHandlerExecutionChain
for theController
Method
.static org.springframework.web.servlet.HandlerExecutionChain
getHandler(java.lang.Class<?> controllerClass, java.lang.String controllerMethodName, java.lang.ClassLoader classLoader, org.springframework.context.ConfigurableApplicationContext springContext)
Obtains theHandlerExecutionChain
for theController
Method
.static void
registerSpringControllerProcedure(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 theRequestMapping
Method
instances.- Parameters:
controllerClass
-Class
that may beController
.methodVisitor
- Receives extractRequestMapping
Method
instances.
-
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.Exception
Obtains theHandlerExecutionChain
for theController
Method
.- Parameters:
controllerClass
-Controller
Class
.controllerMethodName
- Name of theController
Method
.classLoader
-ClassLoader
.springContext
-ConfigurableApplicationContext
.- Returns:
HandlerExecutionChain
for theController
Method
.null
if 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.Exception
Obtains theHandlerExecutionChain
for theController
Method
.- Parameters:
controllerClass
-Controller
Class
.controllerMethod
-Controller
Method
.classLoader
-ClassLoader
.springContext
-ConfigurableApplicationContext
.- Returns:
HandlerExecutionChain
for theController
Method
.null
if 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:ServiceFactory
Creates the service.- Specified by:
createService
in 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:SpringSupplierExtension
Invoked after Spring is loaded.
Allows processing captured information.
- Specified by:
afterSpringLoad
in interfaceSpringSupplierExtension
- Parameters:
context
-AfterSpringLoadSupplierExtensionContext
.- Throws:
java.lang.Exception
- If fails to complete extension configuration.
-
-