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

@Singleton public class ReadEndpointRouteBuilder extends DefaultRouteBuilder
A processor that processes references to Read operations Endpoint instances.
Since:
1.0
Author:
Graeme Rocher
  • Constructor Details

  • Method Details

    • getSupportedAnnotation

      protected Class<? extends Annotation> getSupportedAnnotation()
      Returns:
      The class
    • registerRoute

      protected void registerRoute(ExecutableMethod<?,?> method, String id, Integer port)
      Register a route.
      Parameters:
      method - The ExecutableMethod
      id - The route id
      port - The port
    • start

      @NonNull public @NonNull io.micronaut.management.endpoint.processors.AbstractEndpointRouteBuilder start()
      Description copied from interface: LifeCycle
      Starts the lifecyle component.
      Specified by:
      start in interface LifeCycle<io.micronaut.management.endpoint.processors.AbstractEndpointRouteBuilder>
      Returns:
      This lifecycle component
    • stop

      @NonNull public @NonNull io.micronaut.management.endpoint.processors.AbstractEndpointRouteBuilder stop()
      Clears endpoint ids information.
      Specified by:
      stop in interface LifeCycle<io.micronaut.management.endpoint.processors.AbstractEndpointRouteBuilder>
      Returns:
      This lifecycle component
    • isRunning

      public boolean isRunning()
      Specified by:
      isRunning in interface LifeCycle<io.micronaut.management.endpoint.processors.AbstractEndpointRouteBuilder>
      Returns:
      Whether the component is running
    • process

      public void process(BeanDefinition<?> beanDefinition, ExecutableMethod<?,?> method)
      Description copied from interface: ExecutableMethodProcessor
      The process method will be called for every ExecutableMethod that is annotated with the type parameter A.
      Specified by:
      process in interface AnnotationProcessor<Endpoint,ExecutableMethod<?,?>>
      Specified by:
      process in interface ExecutableMethodProcessor<Endpoint>
      Parameters:
      beanDefinition - The bean definition to process
      method - The executable method
    • resolveActiveEndPointId

      protected Optional<String> resolveActiveEndPointId(Class<?> declaringType)
      Parameters:
      declaringType - The type
      Returns:
      An optional string with the endpoint id
    • buildUriTemplate

      protected UriTemplate buildUriTemplate(ExecutableMethod<?,?> method, String id)
      Parameters:
      method - The ExecutableMethod
      id - The route id
      Returns:
      An UriTemplate
    • isPathParameter

      protected boolean isPathParameter(Argument argument)
      Parameters:
      argument - An Argument
      Returns:
      Whether the argument is a path parameter