@FunctionalInterface public interface FilterCallback
onFilterResult(java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object[], java.lang.Comparable[])
method is notified of all instances that were presented to Matcher.match(java.lang.Object, java.lang.Object, java.lang.Object)
and successfully matched the filter
associated with this callback. The callback will receive the instance being matched, the projected fields (optional,
if specified) and the 'order by' projections (optional, if specified). The 'order by' projection is an array of
Comparable
that can be compared using the Comparator
provided by FilterSubscription.getComparator()
.
Implementations of this interface are provided by the subscriber and must written is such a way that they can be
invoked from multiple threads simultaneously.Modifier and Type | Method and Description |
---|---|
void |
onFilterResult(Object userContext,
Object eventType,
Object instance,
Object[] projection,
Comparable[] sortProjection)
Receives notification that an instance matches the filter.
|
void onFilterResult(Object userContext, Object eventType, Object instance, Object[] projection, Comparable[] sortProjection)
userContext
- the optional user context object passed to Matcher.match(java.lang.Object, java.lang.Object, java.lang.Object)
eventType
- the optional event type discriminator object passed to Matcher.match(java.lang.Object, java.lang.Object, java.lang.Object)
instance
- the object being matchedprojection
- the projection, if a projection was requested or null
otherwisesortProjection
- the projection of fields used for sorting, if sorting was requested or null
otherwiseCopyright © 2020 JBoss, a division of Red Hat. All rights reserved.