Class ReadEndpointRouteBuilder
java.lang.Object
io.micronaut.web.router.DefaultRouteBuilder
io.micronaut.management.endpoint.processors.ReadEndpointRouteBuilder
- All Implemented Interfaces:
LifeCycle<io.micronaut.management.endpoint.processors.AbstractEndpointRouteBuilder>
,AnnotationProcessor<Endpoint,
,ExecutableMethod<?, ?>> ExecutableMethodProcessor<Endpoint>
,RouteBuilder
,Closeable
,AutoCloseable
- Since:
- 1.0
- Author:
- Graeme Rocher
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.micronaut.web.router.RouteBuilder
RouteBuilder.UriNamingStrategy
-
Field Summary
Fields inherited from class io.micronaut.web.router.DefaultRouteBuilder
CAMEL_CASE_NAMING_STRATEGY, conversionService, defaultCharset, executionHandleLocator, LOG, uriNamingStrategy
Fields inherited from interface io.micronaut.web.router.RouteBuilder
ID
-
Constructor Summary
ConstructorDescriptionReadEndpointRouteBuilder
(ApplicationContext beanContext, RouteBuilder.UriNamingStrategy uriNamingStrategy, ConversionService conversionService, EndpointDefaultConfiguration endpointDefaultConfiguration) -
Method Summary
Modifier and TypeMethodDescriptionprotected UriTemplate
buildUriTemplate
(ExecutableMethod<?, ?> method, String id) protected Class<? extends Annotation>
protected boolean
isPathParameter
(Argument argument) boolean
void
process
(BeanDefinition<?> beanDefinition, ExecutableMethod<?, ?> method) The process method will be called for everyExecutableMethod
that is annotated with the type parameter A.protected void
registerRoute
(ExecutableMethod<?, ?> method, String id, Integer port) Register a route.resolveActiveEndPointId
(Class<?> declaringType) @NonNull io.micronaut.management.endpoint.processors.AbstractEndpointRouteBuilder
start()
Starts the lifecyle component.@NonNull io.micronaut.management.endpoint.processors.AbstractEndpointRouteBuilder
stop()
Clears endpoint ids information.Methods inherited from class io.micronaut.web.router.DefaultRouteBuilder
addFilter, buildBeanRoute, buildRoute, buildRoute, buildRoute, DELETE, DELETE, DELETE, error, error, GET, GET, GET, getErrorRoutes, getExposedPorts, getFilterRoutes, getStatusRoutes, getUriNamingStrategy, getUriRoutes, HEAD, HEAD, HEAD, OPTIONS, OPTIONS, OPTIONS, PATCH, PATCH, PATCH, POST, POST, POST, PUT, PUT, PUT, resources, single, status, status, TRACE, TRACE, TRACE
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.micronaut.web.router.RouteBuilder
DELETE, DELETE, DELETE, DELETE, DELETE, DELETE, error, error, error, error, GET, GET, GET, GET, GET, GET, HEAD, HEAD, HEAD, HEAD, HEAD, HEAD, OPTIONS, OPTIONS, OPTIONS, OPTIONS, OPTIONS, OPTIONS, PATCH, PATCH, PATCH, PATCH, PATCH, PATCH, POST, POST, POST, POST, POST, POST, PUT, PUT, PUT, PUT, PUT, PUT, resources, single, status, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE
-
Constructor Details
-
ReadEndpointRouteBuilder
public ReadEndpointRouteBuilder(ApplicationContext beanContext, RouteBuilder.UriNamingStrategy uriNamingStrategy, ConversionService conversionService, EndpointDefaultConfiguration endpointDefaultConfiguration) - Parameters:
beanContext
- The application contexturiNamingStrategy
- The URI naming strategyconversionService
- The conversion serviceendpointDefaultConfiguration
- Endpoints default Configuration
-
-
Method Details
-
getSupportedAnnotation
- Returns:
- The class
-
registerRoute
Register a route.- Parameters:
method
- TheExecutableMethod
id
- The route idport
- The port
-
start
@NonNull public @NonNull io.micronaut.management.endpoint.processors.AbstractEndpointRouteBuilder start()Description copied from interface:LifeCycle
Starts the lifecyle component. -
stop
@NonNull public @NonNull io.micronaut.management.endpoint.processors.AbstractEndpointRouteBuilder stop()Clears endpoint ids information. -
isRunning
public boolean isRunning() -
process
Description copied from interface:ExecutableMethodProcessor
The process method will be called for everyExecutableMethod
that is annotated with the type parameter A.- Specified by:
process
in interfaceAnnotationProcessor<Endpoint,
ExecutableMethod<?, ?>> - Specified by:
process
in interfaceExecutableMethodProcessor<Endpoint>
- Parameters:
beanDefinition
- The bean definition to processmethod
- The executable method
-
resolveActiveEndPointId
- Parameters:
declaringType
- The type- Returns:
- An optional string with the endpoint id
-
buildUriTemplate
- Parameters:
method
- TheExecutableMethod
id
- The route id- Returns:
- An
UriTemplate
-
isPathParameter
- Parameters:
argument
- AnArgument
- Returns:
- Whether the argument is a path parameter
-