Interface FilterCallback

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 FilterCallback
A single-method callback that is specified when registering a filter with a Matcher. The 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.

Since:
7.0
Author:
anistor@redhat.com
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    onFilterResult(Object userContext, Object eventType, Object instance, Object[] projection, Comparable[] sortProjection)
    Receives notification that an instance matches the filter.