Package org.xmlBlaster.client

Examples of org.xmlBlaster.client.XmlBlasterAccess.connect()


            System.out.println("NO XmlBlasterAccess, Hit a key");
            try { System.in.read(); } catch(java.io.IOException e) {}
            XmlBlasterAccess a = new XmlBlasterAccess(glob);

            System.out.println("connecting ...");
            a.connect(null, null);
            System.out.println("connected ...");

            System.out.println("Hit a key");
            try { System.in.read(); } catch(java.io.IOException e) {}
            a.disconnect((DisconnectQos)null);
View Full Code Here


{
   public HelloWorld(String[] args) {
      try {
         I_XmlBlasterAccess con = new XmlBlasterAccess(args);

         con.connect(null, null);    // Login to xmlBlaster as "guest"

         MsgUnit[] msgs = con.get("<key oid='__cmd:?freeMem'/>", null);

         System.out.println("\nHelloWorld: xmlBlaster has currently " +
                new String(msgs[0].getContent()) + " bytes of free memory\n");
View Full Code Here

    */
   private final void doSomething() {
      try {
         I_XmlBlasterAccess con = new XmlBlasterAccess(new String[0]);

         con.connect(null, null);    // Login to xmlBlaster

         MsgUnit[] msgs = con.get("<key oid='__cmd:?freeMem'/>", null);

         System.out.println("\n###ClientPlugin###: xmlBlaster has currently " +
                new String(msgs[0].getContent()) + " bytes of free memory\n");
View Full Code Here

         cbAddr.setDelay(5000L);
         cbAddr.setPingInterval(5000L);
         cbAddr.setRetries(-1);
         connectQos.addCallbackAddress(cbAddr);
         XmlBlasterAccess access = (XmlBlasterAccess)this.connGlobal.getXmlBlasterAccess();
         ConnectReturnQos retQos = access.connect(connectQos, this.updateInterceptor, withQueue);
         log.info("connect return qos: " + retQos.toXml());
        
         SubscribeQos subQos = new SubscribeQos(this.connGlobal);
         subQos.setWantInitialUpdate(false);
         subQos.setMultiSubscribe(false);
View Full Code Here

                  qos.addClientProperty(key, connectQosClientPropertyMap.get(
                        key).toString());
               }
            }
            //log.info("ConnectQos is " + qos.toXml());
            /* ConnectReturnQos crq = */con.connect(qos, new I_Callback() {
               public String update(String cbSessionId, UpdateKey updateKey,
                     byte[] content, UpdateQos updateQos)
                     throws XmlBlasterException {
                  try {
                     log.info("Received '" + updateKey.getOid() + "':"
View Full Code Here

         ConnectQos qos = new ConnectQos(this.glob); /* Client side object */
         qos.setPtpAllowed(false);
         qos.setUserId("A-NATIVE-CLIENT-PLUGIN");
         qos.getSessionQos().setSessionTimeout(0L);
         con.connect(qos, null);    // Login to xmlBlaster as "A-NATIVE-CLIENT-PLUGIN"
         //Here we can publish or subscribe etc., see HelloWorld3.java how to do it
         con.publish(new MsgUnit(glob, "<key oid='TEST'/>", "Hi", "<qos/>"));
         //con.disconnect(null);
      }
      catch (Exception e) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.