[jdev] Net::Jabber::Protocol::CallBack() logic

Scott Bolte listS+jabber-jdev at niss.com
Wed Apr 7 14:11:29 CDT 2004


	Ryan,

	The logic in the CallBack method for unregistered stanzas
	is to first cycle through the XPath callbacks, and then,
	inexorably, process generic tag (e.g. IQ) callbacks.  Is
	the unconditional use of the generic callbacks a deliberate
	design decision or an artifact of the implementation?

	What I want to do is normally use XPath based callbacks for
	messages.  But if no XPath callback matches a new stanza,
	then and only then have a generic 'default' callback invoked.

	I know I could maintain my own state table based on stream
	ids, but that's a kludge at best. A more elegant approach
	would be to use the return value of a callback to control
	future processing of that stanza.

	Is such a change possible, or are there architectural
	constraints?

		Scott




More information about the JDev mailing list