How can I handle events published by other modules?

Across uses its own event bus for publishing events. Any module can define multiple event handlers. An event handler is a single parameter method:

    • The parameter type implements AcrossEvent and defines the type of event the method handles.
    • The method is annotated with @Event, indicating it is an event handler.

All created components will automatically be scanned for event handler methods.

See the reference documentation section on Events for more details.