Package io.micronaut.nats.intercept
Class AbstractIntroductionAdvice
java.lang.Object
io.micronaut.nats.intercept.AbstractIntroductionAdvice
- Direct Known Subclasses:
- JetStreamIntroductionAdvice,- NatsIntroductionAdvice
Abstract Implementation for nats introduction advices.
- Since:
- 4.0.0
- Author:
- Joachim Grimm
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected final io.micronaut.context.BeanContextprotected final io.micronaut.core.convert.ConversionServiceprotected final reactor.core.scheduler.Schedulerprotected final NatsMessageSerDesRegistry
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedAbstractIntroductionAdvice(io.micronaut.context.BeanContext beanContext, ExecutorService executorService, io.micronaut.core.convert.ConversionService conversionService, NatsMessageSerDesRegistry serDesRegistry) Default constructor.
- 
Method SummaryModifier and TypeMethodDescriptionprotected io.nats.client.MessagebuildNatsMessage(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.protected StaticPublisherStatebuildPublisherState(io.micronaut.inject.ExecutableMethod<?, ?> method) builds the cacheable publisher state.protected static ObjecthandleResult(io.micronaut.aop.InterceptedMethod interceptedMethod, reactor.core.publisher.Mono<?> reactive) 
- 
Field Details- 
beanContextprotected final io.micronaut.context.BeanContext beanContext
- 
schedulerprotected final reactor.core.scheduler.Scheduler scheduler
- 
serDesRegistry
- 
conversionServiceprotected final io.micronaut.core.convert.ConversionService conversionService
 
- 
- 
Constructor Details- 
AbstractIntroductionAdviceprotected 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- 
handleResultprotected static Object handleResult(io.micronaut.aop.InterceptedMethod interceptedMethod, reactor.core.publisher.Mono<?> reactive) 
- 
buildNatsMessageprotected 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
 
- 
buildPublisherStateprotected StaticPublisherState buildPublisherState(io.micronaut.inject.ExecutableMethod<?, ?> method) builds the cacheable publisher state.- Parameters:
- method- the executable method
- Returns:
- the publisher state
 
 
-