Package net.sf.eBus.client
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 allowsESubscribeFeed
andEReplyFeed
to automatically test a message in order to determine if it should be passed on to a client. Iftest
returnstrue
eBus forwards the message to the client. Iftest
returnsfalse
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)
Returnstrue
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)
Returnstrue
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 returnedfalse
.- Parameters:
msg
- The tested notification message.- Returns:
true
if the message meets this condition and so should be passed to the eBus client.
-
-