Skip to content

blackbull.event_aggregator

blackbull.event_aggregator

EventAggregator

Translates Level A Actor messages into Level B EventDispatcher calls.

This class is not an Actor — it has no inbox and no lifecycle of its own. It is instantiated once per application and passed by reference to each Actor at construction time.

Each method corresponds to one Level B event defined in ActorDesign.md. Methods are called by Actors; they must always be called from the event loop thread.

Note

Do not export this class from blackbull/__init__.py. It is a framework-internal component.

on_after_handler(scope, exception=None) async

Fire Level B after_handler.

on_app_shutdown() async

Fire Level B app_shutdown.

on_app_startup() async

Fire Level B app_startup.

on_before_handler(scope, receive, send, call_next) async

Fire Level B before_handler then invoke the next handler.

on_connection_accepted(peername) async

Level A notification — no Level B event fires yet.

on_error(scope, exception) async

Fire Level B error.

on_request_completed(scope) async

Fire Level B request_completed.

on_request_disconnected(scope) async

Fire Level B request_disconnected.

on_request_received(scope) async

Fire Level B request_received.

on_websocket_connected(scope, subprotocol=None) async

Fire Level B websocket_connected.

on_websocket_disconnected(scope, code=1006) async

Fire Level B websocket_disconnected.

on_websocket_message(scope, message) async

Fire Level B websocket_message.