MCPcopy Create free account
hub / github.com/apache/qpid-proton / dispatch

Method dispatch

python/proton/_events.py:147–159  ·  view source on GitHub ↗

Process this event by sending it to all known handlers that are valid for this event type. :param handler: Parent handler to process this event :param type: Event type

(self, handler: Handler, type: Optional[EventType] = None)

Source from the content-addressed store, hash-verified

145 return None
146
147 def dispatch(self, handler: Handler, type: Optional[EventType] = None) -> None:
148 """
149 Process this event by sending it to all known handlers that
150 are valid for this event type.
151
152 :param handler: Parent handler to process this event
153 :param type: Event type
154 """
155 type = type or self._type
156 _dispatch(handler, type.method, self)
157 if hasattr(handler, "handlers"):
158 for h in handler.handlers:
159 self.dispatch(h, type)
160
161 def __repr__(self) -> str:
162 return "%s(%r)" % (self._type, self.context)

Callers 5

on_unhandledMethod · 0.45
processMethod · 0.45
on_unhandledMethod · 0.45
_overrideMethod · 0.45
on_unhandledMethod · 0.45

Calls 1

_dispatchFunction · 0.85

Tested by

no test coverage detected