Raxol.Core.Runtime.Events.Handler (Raxol v2.0.1)

View Source

Manages event handlers registration and execution in the Raxol system.

This module is responsible for:

  • Registering event handlers for specific event types
  • Executing handlers when events occur
  • Managing the priority and order of handlers

Summary

Functions

Executes a dynamically registered handler. This is called by EventManager and looks up the actual handler function.

Executes all registered handlers for the given event. Handlers are executed in priority order (lowest to highest). Each handler can transform the event for the next handler.

Registers a new event handler for the specified event types.

Unregisters an event handler.

Functions

execute_dynamic_handler(event)

Executes a dynamically registered handler. This is called by EventManager and looks up the actual handler function.

execute_handlers(event, state)

Executes all registered handlers for the given event. Handlers are executed in priority order (lowest to highest). Each handler can transform the event for the next handler.

register_handler(handler_id, event_types, handler_fun, options \\ [])

Registers a new event handler for the specified event types.

unregister_handler(handler_id)

Unregisters an event handler.

Parameters

  • handler_id: ID of the handler to remove