L - The listener typeM - The message typepublic abstract class AbstractMqttIntroductionAdvice<L,M>
extends java.lang.Object
implements io.micronaut.aop.MethodInterceptor<java.lang.Object,java.lang.Object>
| Constructor and Description |
|---|
AbstractMqttIntroductionAdvice(MqttBinderRegistry binderRegistry) |
| Modifier and Type | Method and Description |
|---|---|
abstract MqttBindingContext<M> |
createBindingContext(io.micronaut.aop.MethodInvocationContext<java.lang.Object,java.lang.Object> context) |
abstract L |
createListener(java.lang.Runnable onSuccess,
java.util.function.Consumer<java.lang.Throwable> onError)
Create a listener.
|
abstract java.lang.Class<? extends java.lang.annotation.Annotation> |
getRequiredAnnotation() |
java.lang.Object |
intercept(io.micronaut.aop.MethodInvocationContext<java.lang.Object,java.lang.Object> context) |
abstract java.lang.Object |
publish(java.lang.String topic,
M message,
L listener)
Publishes the message.
|
public AbstractMqttIntroductionAdvice(MqttBinderRegistry binderRegistry)
public java.lang.Object intercept(io.micronaut.aop.MethodInvocationContext<java.lang.Object,java.lang.Object> context)
intercept in interface io.micronaut.aop.MethodInterceptor<java.lang.Object,java.lang.Object>public abstract MqttBindingContext<M> createBindingContext(io.micronaut.aop.MethodInvocationContext<java.lang.Object,java.lang.Object> context)
context - The method contextpublic abstract java.lang.Object publish(java.lang.String topic,
M message,
L listener)
topic - The topic to publish the message tomessage - The message to publishlistener - The publish action listenerpublic abstract L createListener(java.lang.Runnable onSuccess, java.util.function.Consumer<java.lang.Throwable> onError)
onSuccess - The code to call when a message is sent successfullyonError - The consumer to call in the case of an exceptionpublic abstract java.lang.Class<? extends java.lang.annotation.Annotation> getRequiredAnnotation()