@FunctionalInterface
@API(status=STABLE)
public interface ActivityMatcher<C extends ActivityContext<?>>
Modifier and Type | Method and Description |
---|---|
static <C extends ActivityContext<?>> |
always()
Returns a matcher that always returns true.
|
boolean |
matches(C context)
Matches the
ActivityContext to decide whether an AbstractActivity can be executed or not. |
boolean matches(C context) throws EventException
ActivityContext
to decide whether an AbstractActivity
can be executed or not.context
- Current activity context.AbstractActivity.onActivity(ActivityContext)
can be triggered, false otherwise.EventException
- Throw this exception if this method should fail the current events processing
and re-queue the events in datafeed. Other exceptions will be caught silently.static <C extends ActivityContext<?>> ActivityMatcher<C> always()
C
- the type of the activity context