Hello!Oleg,
In my application i need to emulate some pull functionality. My code now looks like:
public class MyPlugin implements I_Plugin, I_CommandHandler { .............. public void init(Global glob, PluginInfo pluginInfo) throws XmlBlasterException { org.xmlBlaster.engine.Global engineGlob = (org.xmlBlaster.engine.Global) glob.getObjectEntry("ServerNodeScope"); engineGlob.getCommandManager().register("my_command", this); } .............. public MsgUnitRaw[] get(String sessionId, CommandWrapper cmd) throws XmlBlasterException { MsgUnitRaw units = new MsgUnitRaw[1]; ............... return units; } .............. }
Client:
for unit in blaster.get("<key oid='__cmd:my_command/?id=10'/>", "<qos/>"): print unit.content
All works like a charm, but does this approach is correct? Can I rely on this API?
Thanks, Oleg.
when i get you right you are creating your own new messages in your plugin instead of by a publish or an internal query. I have never thought of such a use case - but why not. What is you global archicture that you need such an approach, what is the task you want to solve? Just to be curious - what is the programming language in client side?
regards
Marcel
-- http://www.xmlBlaster.org
