[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xmlblaster] pull



Hello!

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.