/*------------------------------------------------------------------------------ Name: ClientGet.java Project: xmlBlaster.org Copyright: xmlBlaster.org, see xmlBlaster-LICENSE file Comment: Demo code for a client using xmlBlaster Version: $Id: ClientQuery.java 14861 2006-03-07 19:19:47Z goetzger $ ------------------------------------------------------------------------------*/ package javaclients; import java.util.logging.Logger; import org.xmlBlaster.util.Global; import org.xmlBlaster.util.XmlBlasterException; import org.xmlBlaster.client.I_XmlBlasterAccess; import org.xmlBlaster.client.key.UpdateKey; import org.xmlBlaster.util.MsgUnit; /** * This client allows you to query xmlBlaster synchronous with method get(). *
* It doesn't implement a Callback server, since it only access xmlBlaster * using the synchronous get() method. *
* Invoke example:
*
* java javaclients.ClientQuery -queryXpath "//key" **/ public class ClientQuery { private static String ME = "ClientQuery"; private static Logger log = Logger.getLogger(ClientQuery.class.getName()); private String queryString; private String queryType = "XPATH"; public ClientQuery(String args[]) { // Initialize command line argument handling (this is optional) Global glob = new Global(); if (glob.init(args) != 0) usage("Aborted"); try { String loginName = glob.getProperty().get("session.name", ME); // check if parameter -session.name