[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [xmlblaster] Service interface
Steve Mentzer wrote:
I'd like to be able to create a plugin for XmlBlaster that responds to a
synchronous get() message with a result, just like the XmlDb feature. I
noticed a comment in RequestBroker.java identified the need for a service
interface. Any idea when this will be available?
Hi Steve,
an interceptor for get() is missing.
I think the best approach for such a plugin
interface is to do it similar to the publish mime
filter plugin:
http://www.xmlblaster.org/xmlBlaster/doc/requirements/mime.plugin.publishfilter.html
In the get() method in RequestBroker.java:901 we would
check for a suitable get() interceptor plugin depending
on the mime type in the <key oid='...' contentMime='...'/>
of the get() request.
The interceptor could return 'null' to proceed with
the get() request into the xmlBlaster core
or it could return a MsgUnit[] which would be
immediately returned to the calling client.
Search for 'I_PublishFilter' in RequestBroker.java
to see how it is done similar with the publish filter.
If you implement this feature we could add it to the
xmlBlaster code. In this case you need to provide
testcases for it and a 'requirement' xml file describing
the usage.
Without that the best thing I can think of to do is to create a plugin
that receives PtP messages sent to it, does the requested work, then sends
a PtP message back to the sender with the results. However, this is async
of course. Is there a better way?
This would work. I don't know of a better way.
Steve
best regards,
Marcel
--
http://www.xmlBlaster.org