Interface AdaptrisMessageListener

    • Method Detail

      • onAdaptrisMessage

        default void onAdaptrisMessage​(AdaptrisMessage msg)

        It is the responsibility of implementations of this interface to ensure that all Exceptions, including RuntimeExceptions, are handled. Failure to handle any Exception will result in undefined behaviour. Throwing a RuntimeException to this method is considered a bug.

        Although most clients of implementations of this interface are likely to be single-threaded, if implementations are not guaranteed to be thread safe, they should be synchronized or use some other locking mechanism.

        Parameters:
        msg - the AdaptrisMessage to process
        Implementation Note:
        the default implementation just calls onAdaptrisMessage(AdaptrisMessage, Consumer).
      • onAdaptrisMessage

        default void onAdaptrisMessage​(AdaptrisMessage msg,
                                       java.util.function.Consumer<AdaptrisMessage> success)
        Handle a message with a call back action if a message is successful.
        Parameters:
        msg - the message
        success - called on success
      • onAdaptrisMessage

        void onAdaptrisMessage​(AdaptrisMessage msg,
                               java.util.function.Consumer<AdaptrisMessage> success,
                               java.util.function.Consumer<AdaptrisMessage> failure)
        Handle a message with call back actions if a message is successful or failed.
        Parameters:
        msg - the message
        success - called on success
        failure - called on failure
      • friendlyName

        java.lang.String friendlyName()
        Get the friendly name for this component.
        Returns:
        the friendly name.