Interface EventBusAware


public interface EventBusAware
Interface implemented by components that utilize an EventBus for publishing and/or subscribing to/from events and wish that EventBus to be supplied if one is available.

NOTE: If an EventBusAware implementation wishes to subscribe to events (i.e. it has @Subscriber-annotated methods itself, it must register itself with the event bus, i.e.:

 eventBus.register(this);
 
Shiro's default configuration mechanisms will NOT auto-register @Subscriber-annotated components that are also EventBusAware: it is assumed that the EventBusAware implementation, having access to an EventBus directly, knows best when to register/unregister itself.
Since:
1.3
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Sets the available EventBus that may be used for publishing and subscribing to/from events.
  • Method Details

    • setEventBus

      void setEventBus(EventBus bus)
      Sets the available EventBus that may be used for publishing and subscribing to/from events.
      Parameters:
      bus - the available EventBus.