bobocep.cep.action.handler.BoboActionHandlerBlocking

class bobocep.cep.action.handler.BoboActionHandlerBlocking(max_size: int = 0)[source]

Bases: BoboActionHandler

An action handler that blocks during action execution.

__init__(max_size: int = 0)[source]
Parameters:

max_size – Maximum queue size. Default: 0 (unbounded).

close() None

Close the handler.

get_handler_response() BoboHandlerResponse | None
Returns:

Action response from queue, or None if queue is empty.

handle(action: BoboAction, event: BoboEventComplex) Any

Handle an action.

Parameters:
  • action – The action to handle.

  • event – The complex event that caused the action to trigger.

Returns:

A return value from handling the action.

is_closed() bool
Returns:

True if handler is closed; False otherwise.

size() int
Returns:

The size of the handler queue.