Package proton :: Module handlers :: Class IncomingMessageHandler

[frames] | no frames]

# Class IncomingMessageHandler

source code

    object --+
             |
       Handler --+
                 |
    object --+   |
             |   |
        Acking --+
                 |
                IncomingMessageHandler

Known Subclasses:
  - utils.SyncRequestResponse

A utility for simpler and more intuitive handling of delivery events related to incoming i.e. received messages.

Instance Methods

__init__(self, auto_accept=True, delegate=None) x.__init__(...) initializes x; see help(type(x)) for signature | source code

on_delivery(self, event) | source code

on_message(self, event) Called when a message is received. | source code

on_settled(self, event) | source code

Inherited from `Handler`: `handlers`, `on_unhandled` Inherited from `Acking`: `accept`, `reject`, `release`, `settle` Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__sizeof__`, `__str__`, `__subclasshook__`

Properties
Inherited from `object`: `__class__`

Method Details

### __init__(self, auto_accept=True, delegate=None)
(Constructor)

source code

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
  (inherited documentation)

### on_message(self, event)

source code

Called when a message is received. The message itself can be obtained as a property on the event. For the purpose of refering to this message in further actions (e.g. if explicitly accepting it, the ``delivery`` should be used, also obtainable via a property on the event.