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>,BeanDefinitionProcessor<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, uriNamingStrategyFields inherited from interface io.micronaut.web.router.RouteBuilder
ID -
Constructor Summary
ConstructorsConstructorDescriptionReadEndpointRouteBuilder(ApplicationContext beanContext, RouteBuilder.UriNamingStrategy uriNamingStrategy, ConversionService conversionService, EndpointDefaultConfiguration endpointDefaultConfiguration) -
Method Summary
Modifier and TypeMethodDescriptionprotected UriTemplatebuildUriTemplate(ExecutableMethod<?, ?> method, String id) protected Class<? extends Annotation> protected booleanisPathParameter(Argument argument) booleanvoidprocess(BeanDefinition<?> beanDefinition, BeanContext beanContext) The process method will be called for every bean annotated with the given annotation type.protected voidregisterRoute(ExecutableMethod<?, ?> method, String id, Integer port) Register a route.resolveActiveEndPointId(Class<?> declaringType) @NonNull io.micronaut.management.endpoint.processors.AbstractEndpointRouteBuilderstart()Starts the lifecyle component.@NonNull io.micronaut.management.endpoint.processors.AbstractEndpointRouteBuilderstop()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, TRACEMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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- TheExecutableMethodid- The route idport- The port
-
start
public @NonNull io.micronaut.management.endpoint.processors.AbstractEndpointRouteBuilder start()Description copied from interface:LifeCycleStarts the lifecyle component. -
stop
public @NonNull io.micronaut.management.endpoint.processors.AbstractEndpointRouteBuilder stop()Clears endpoint ids information. -
isRunning
public boolean isRunning() -
process
Description copied from interface:BeanDefinitionProcessorThe process method will be called for every bean annotated with the given annotation type.- Specified by:
processin interfaceBeanDefinitionProcessor<Endpoint>- Parameters:
beanDefinition- The bean definitionbeanContext- The bean context
-
resolveActiveEndPointId
- Parameters:
declaringType- The type- Returns:
- An optional string with the endpoint id
-
buildUriTemplate
- Parameters:
method- TheExecutableMethodid- The route id- Returns:
- An
UriTemplate
-
isPathParameter
- Parameters:
argument- AnArgument- Returns:
- Whether the argument is a path parameter
-