Package com.symphony.bdk.core.activity
Interface ActivityMatcher<C extends ActivityContext<?>>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface
@API(status=STABLE)
public interface ActivityMatcher<C extends ActivityContext<?>>
An activity matcher allows to check if an activity business logic has to be triggered or not.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <C extends ActivityContext<?>>
ActivityMatcher<C>always()
Returns a matcher that always returns true.boolean
Matches theActivityContext
to decide whether anAbstractActivity
can be executed or not.
-
Method Details
-
matches
Matches theActivityContext
to decide whether anAbstractActivity
can be executed or not.- Parameters:
context
- Current activity context.- Returns:
- true if
AbstractActivity.onActivity(ActivityContext)
can be triggered, false otherwise. - Throws:
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.
-
always
Returns a matcher that always returns true.- Type Parameters:
C
- the type of the activity context- Returns:
- a matcher that always returns true.
-