Interface EventBusListenerMethodFilter

All Known Implementing Classes:
NoEventBusListenerMethodFilter

public interface EventBusListenerMethodFilter

A method annotated with @EventBusListenerMethod will be invoked if it is subscribed to the EventBus that published the Event (or Object payload). That method will oftentimes employ filtering code in the method internals, because of the possibility that multiple annotated methods might listen to same the Event.

As a convenience, an implementation of this filter may be defined in EventBusListenerMethod.filter() and stand in place of such filtering code.

Author:
Chris Phillipson (fastnsilver@gmail.com)
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    filter(Event<?> event)
    Criteria used to influence when an @EventBusListenerMethod annotated method with this filter defined will execute
  • Method Details

    • filter

      boolean filter(Event<?> event)
      Criteria used to influence when an @EventBusListenerMethod annotated method with this filter defined will execute
      Parameters:
      event - EventBus event
      Returns:
      true if filtering condition met; false otherwise