EventCallback.__init__

EventCallback.__init__(callback_func, event_name=None, event_params=None)[source]

Create a new event callback.

The constructor allows us to create a new event callback for a specific event or all events.

Parameters
  • callback_func (function) – The callback function to invoke whenever our event criteria (event name and event params) match.

  • event_name (str, optional) – The name of the event we want to filter on. Our callback_func will only be invoked for events of this type. If no event_name is given all events will invoke our callback.

  • event_params (dict, optional) – Event parameters allow us to further filter events on a more fine granular basis. For instance, we might not be interested in all second level paging events, but only in execute violations. Event parameters allow us to filter events based on such criteria. What paramaters are supported depend on the event type (event_name) that we are interested in. The event paramters that are supported can be found in the documentation of the event class.

Returns

A new event callback object. To use this callback we have to register it with the event system (see tenjint.event.EventManager.request_event()).

Return type

object