Class HttpClientIntroductionAdvice

  • All Implemented Interfaces:
    io.micronaut.aop.Interceptor<java.lang.Object,​java.lang.Object>, io.micronaut.aop.MethodInterceptor<java.lang.Object,​java.lang.Object>, io.micronaut.core.order.Ordered

    @Singleton
    @Internal
    public class HttpClientIntroductionAdvice
    extends java.lang.Object
    implements io.micronaut.aop.MethodInterceptor<java.lang.Object,​java.lang.Object>
    Introduction advice that implements the Client annotation.
    Since:
    1.0
    • Field Summary

      • Fields inherited from interface io.micronaut.aop.Interceptor

        ARGUMENT, CACHEABLE_LAZY_TARGET, HOTSWAP, LAZY, PROXY_TARGET
      • Fields inherited from interface io.micronaut.core.order.Ordered

        HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object intercept​(io.micronaut.aop.MethodInvocationContext<java.lang.Object,​java.lang.Object> context)
      Interceptor to apply headers, cookies, parameter and body arguements.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface io.micronaut.aop.MethodInterceptor

        intercept
      • Methods inherited from interface io.micronaut.core.order.Ordered

        getOrder
    • Constructor Detail

      • HttpClientIntroductionAdvice

        public HttpClientIntroductionAdvice​(HttpClientRegistry<?> clientFactory,
                                            io.micronaut.json.codec.JsonMediaTypeCodec jsonMediaTypeCodec,
                                            java.util.List<ReactiveClientResultTransformer> transformers,
                                            HttpClientBinderRegistry binderRegistry,
                                            io.micronaut.core.convert.ConversionService<?> conversionService)
        Constructor for advice class to setup things like Headers, Cookies, Parameters for Clients.
        Parameters:
        clientFactory - The client factory
        jsonMediaTypeCodec - The JSON media type codec
        transformers - transformation classes
        binderRegistry - The client binder registry
        conversionService - The bean conversion context
    • Method Detail

      • intercept

        @Nullable
        public java.lang.Object intercept​(io.micronaut.aop.MethodInvocationContext<java.lang.Object,​java.lang.Object> context)
        Interceptor to apply headers, cookies, parameter and body arguements.
        Specified by:
        intercept in interface io.micronaut.aop.MethodInterceptor<java.lang.Object,​java.lang.Object>
        Parameters:
        context - The context
        Returns:
        httpClient or future