Interface ECondition

  • Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface ECondition
    This interface allows ESubscribeFeed and EReplyFeed to automatically test a message in order to determine if it should be passed on to a client. If test returns true eBus forwards the message to the client. If test returns false or throws an exception, then the message is not forwarded.

    In eBus v. 4.2.0, this interface is now marked as a @FunctionalInterface, allowing this interface to be defined using a Java lambda expression.

    Author:
    Charles Rapp
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean test​(EMessage msg)
      Returns true if the message meets this condition and so should be passed to the eBus client; false if the message should not be passed on.
    • Method Detail

      • test

        boolean test​(EMessage msg)
        Returns true if the message meets this condition and so should be passed to the eBus client; false if the message should not be passed on. If this method throws an exception, it is treated the same as having returned false.
        Parameters:
        msg - The tested notification message.
        Returns:
        true if the message meets this condition and so should be passed to the eBus client.