Package com.qfs.msg

Interface IMessageHandler<I>

Type Parameters:
I - The indentifier of the handled messages.
All Known Implementing Classes:
AFeedLoadingHandler, FileInfoLogMessageHandler, LogExternalFeedLoadingHandler, LogMessageHandler

public interface IMessageHandler<I>
Callback when there is an event on the message.
Author:
ActiveViam
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    onError(I key, Throwable ex)
    The method that is called when there is an error.
    void
    Called after the message has been successfully published.
    void
    Called when the message starts.
  • Method Details

    • onMessageStarted

      void onMessageStarted(I key)
      Called when the message starts.
      Parameters:
      key - the key of the message
    • onMessagePublished

      void onMessagePublished(I key, IPublicationInfo info)
      Called after the message has been successfully published.
      Parameters:
      key - the key of the message
      info - information about the publication of the message (optional, may be null if the data source does not support this feature)
    • onError

      void onError(I key, Throwable ex)
      The method that is called when there is an error.

      This method is supposed to gracefully handle the error without failure. Particularly, throwing in this method results in an undefined behaviour, including the unexpected stoppage of the channel processing.

      Parameters:
      key - the key of the message
      ex - the exception