Opened 14 years ago
Last modified 14 years ago
#19 new enhancement
priority for handlers
Reported by: | tofu | Owned by: | ralphm |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | generic | Keywords: | |
Cc: |
Description
For iq handlers and in supprotocols.XMPPHandlerCollection it would nice to have priority on these handlers.
Change History (2)
comment:1 Changed 14 years ago by jack
comment:2 Changed 14 years ago by ralphm
Handlers in XMPPHandlerCollection are stored in a list and thus have order. I am not really sure about the msg.handled stuff I've done all over the place. Maybe we should look at how EventDispatcher processes its registered observers. E.g. that you could return a value that lets the dispatcher know it can stop dispatching for this event.
I am not really unsure about IQHandlerMixin either, so that needs more thinking, too.
By the way, most of the stuff in the subprotocols module have been merged into Twisted, with some naming differences. I should deprecate them in Wokkel, and tickets should be filed in the Twisted tracker.
It appears that some kind of ordering is used because the MessageProtocol? stops processing if msg.handled == True. This is probably dependent on the order objects are added, but it would be great if this could be controlled.
Some documentation on how this works would not hurt either.