Class AbstractIntroductionAdvice

java.lang.Object
io.micronaut.nats.intercept.AbstractIntroductionAdvice
Direct Known Subclasses:
JetStreamIntroductionAdvice, NatsIntroductionAdvice

public abstract class AbstractIntroductionAdvice extends Object
Abstract Implementation for nats introduction advices.
Since:
4.0.0
Author:
Joachim Grimm
  • Field Details

    • beanContext

      protected final io.micronaut.context.BeanContext beanContext
    • scheduler

      protected final reactor.core.scheduler.Scheduler scheduler
    • serDesRegistry

      protected final NatsMessageSerDesRegistry serDesRegistry
    • conversionService

      protected final io.micronaut.core.convert.ConversionService conversionService
  • Constructor Details

    • AbstractIntroductionAdvice

      protected AbstractIntroductionAdvice(io.micronaut.context.BeanContext beanContext, @Named("consumer") ExecutorService executorService, io.micronaut.core.convert.ConversionService conversionService, NatsMessageSerDesRegistry serDesRegistry)
      Default constructor.
      Parameters:
      beanContext - The bean context
      executorService - The executor to execute reactive operations on
      conversionService - The conversion service
      serDesRegistry - The serdes registry
  • Method Details

    • handleResult

      protected static Object handleResult(io.micronaut.aop.InterceptedMethod interceptedMethod, reactor.core.publisher.Mono<?> reactive)
    • buildNatsMessage

      protected io.nats.client.Message buildNatsMessage(io.micronaut.aop.MethodInvocationContext<Object,Object> context, io.nats.client.impl.Headers headers, io.micronaut.core.type.Argument<?> bodyArgument, NatsMessageSerDes<Object> serDes, Optional<String> subjectOptional)
      build the nats message to send.
      Parameters:
      context - the method invocation context
      headers - the nats headers from the method
      bodyArgument - the body argument
      serDes - the nats message serdes
      subjectOptional - the optional subject
      Returns:
      the nats message
    • buildPublisherState

      protected StaticPublisherState buildPublisherState(io.micronaut.inject.ExecutableMethod<?,?> method)
      builds the cacheable publisher state.
      Parameters:
      method - the executable method
      Returns:
      the publisher state