Class AbstractMessageHandler

All Implemented Interfaces:
org.reactivestreams.Subscriber<Message<?>>, Aware, BeanFactoryAware, BeanNameAware, DisposableBean, InitializingBean, ApplicationContextAware, Ordered, ExpressionCapable, Orderable, IntegrationPattern, NamedComponent, IntegrationManagement, TrackableComponent, MessageHandler, reactor.core.CoreSubscriber<Message<?>>
Direct Known Subclasses:
AbstractInternetProtocolSendingMessageHandler, AbstractMessageProducingHandler, AbstractMessageRouter, AbstractMqttMessageHandler, AbstractXmppConnectionAwareMessageHandler, ApplicationEventPublishingMessageHandler, ByteStreamWritingMessageHandler, CharacterStreamWritingMessageHandler, CorrelatingMessageBarrier, ExpressionEvaluatingMessageHandler, FileTransferringMessageHandler, HazelcastCacheWritingMessageHandler, JdbcMessageHandler, JmsSendingMessageHandler, LoggingHandler, MailSendingMessageHandler, MethodInvokingMessageHandler, MongoDbStoringMessageHandler, NotificationPublishingMessageHandler, RabbitStreamMessageHandler, RedisPublishingMessageHandler, RedisQueueOutboundChannelAdapter, RedisStoreWritingMessageHandler, StompMessageHandler, StoredProcMessageHandler, TcpSendingMessageHandler, WebSocketOutboundMessageHandler

public abstract class AbstractMessageHandler extends MessageHandlerSupport implements MessageHandler, reactor.core.CoreSubscriber<Message<?>>
Base class for MessageHandler implementations.
Author:
David Turanski, Artem Bilan
  • Constructor Details

    • AbstractMessageHandler

      public AbstractMessageHandler()
  • Method Details

    • setObservationConvention

      public void setObservationConvention(@Nullable MessageReceiverObservationConvention observationConvention)
      Set a custom MessageReceiverObservationConvention for IntegrationObservation.HANDLER. Ignored if an ObservationRegistry is not configured for this component.
      Parameters:
      observationConvention - the MessageReceiverObservationConvention to use.
      Since:
      6.0
    • handleMessage

      public void handleMessage(Message<?> message)
      Specified by:
      handleMessage in interface MessageHandler
    • onSubscribe

      public void onSubscribe(org.reactivestreams.Subscription subscription)
      Specified by:
      onSubscribe in interface reactor.core.CoreSubscriber<Message<?>>
      Specified by:
      onSubscribe in interface org.reactivestreams.Subscriber<Message<?>>
    • onError

      public void onError(Throwable throwable)
      Specified by:
      onError in interface org.reactivestreams.Subscriber<Message<?>>
    • onComplete

      public void onComplete()
      Specified by:
      onComplete in interface org.reactivestreams.Subscriber<Message<?>>
    • onNext

      public void onNext(Message<?> message)
      Specified by:
      onNext in interface org.reactivestreams.Subscriber<Message<?>>
    • handleMessageInternal

      protected abstract void handleMessageInternal(Message<?> message)