Package qpid :: Package messaging :: Module endpoints :: Class Endpoint
[frames] | no frames]

type Endpoint

source code

Known Subclasses:

Base class for all endpoint objects types.

Instance Methods
 
set_async_exception_notify_handler(self, handler)
Register a callable that will be invoked when the driver thread detects an error on the Endpoint.
source code
Method Details

set_async_exception_notify_handler(self, handler)

source code 

Register a callable that will be invoked when the driver thread detects an error on the Endpoint. The callable is invoked with the instance of the Endpoint object passed as the first argument. The second argument is an Exception instance describing the failure.

Parameters:
  • handler (callable object taking an Endpoint and an Exception as arguments.) - invoked by the driver thread when an error occurs.
Returns:
None
Decorators:
  • @synchronized

Note: The exception will also be raised the next time the application invokes one of the blocking messaging APIs.

Warning: Use with caution This callback is invoked in the context of the driver thread. It is NOT safe to call ANY of the messaging APIs from within this callback. This includes any of the Endpoint's methods. The intent of the handler is to provide an efficient way to notify the application that an exception has occurred in the driver thread. This can be useful for those applications that periodically poll the messaging layer for events. In this case the callback can be used to schedule a task that retrieves the error using the Endpoint's get_error() or check_error() methods.