Package org.xmlBlaster.client

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


      try {
         try {
            con = glob.getXmlBlasterAccess();
            ConnectQos qos = new ConnectQos(glob, name, passwd);
            qos.setSessionTimeout(timeout);
            con.connect(qos, this);
         }
         catch (Exception e) {
            log.severe(e.toString());
            assertTrue("Login failed" + e.toString(), false);
         }
View Full Code Here


      I_XmlBlasterAccess con = null;
      try {
         con = glob.getXmlBlasterAccess();

         ConnectQos qos = new ConnectQos(glob);
         con.connect(qos, null)// Login to xmlBlaster, register for updates

         for (int j=0; j < sweeps; j++) {
            for (int i=0; i < nmax; i++) {
               points[i] = newPoint(points[i], bound);
               String content = new String(points[i].x + ";" + points[i].y);
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


      try {
         ConnectQos loginQos = new ConnectQos(null); // creates "<qos></qos>" string
         I_XmlBlasterAccess blasterConnection = glob.getXmlBlasterAccess();
         blasterConnection.connect(loginQos, this)// Now we are connected to xmlBlaster MOM server.

         // Subscribe to messages with XPATH using some helper classes
         log.info("Subscribing #1 for anonymous callback class using XPath syntax ...");
         SubscribeKey key = new SubscribeKey(glob, "//DispatchTest", "XPATH");
         SubscribeQos qos = new SubscribeQos(glob);
View Full Code Here

            Global global = new Global(args);
            ConnectQos qos = new ConnectQos(global, userName + "/" + sessionId, "secret");
            qos.getSessionCbQueueProperty().setMaxEntries(10L);
            qos.getSessionCbQueueProperty().setMaxEntriesCache(10L);
            I_XmlBlasterAccess conn = global.getXmlBlasterAccess();
            conn.connect(qos, this);
            SubscribeKey subKey = new SubscribeKey(global, topicName);
            SubscribeQos subQos = new SubscribeQos(global);
            conn.subscribe(subKey, subQos);
            // conn.leaveServer(null);
            DisconnectQos disconnectQos = new DisconnectQos(global);
View Full Code Here

         Global secondGlobal = new Global(args);
         MsgInterceptor msgInterceptor = new MsgInterceptor(secondGlobal, log, null);
         ConnectQos qos = new ConnectQos(secondGlobal, "tester/1", "secret");
         I_XmlBlasterAccess conn2 = secondGlobal.getXmlBlasterAccess();
         conn2.connect(qos, msgInterceptor);
         SubscribeKey subKey = new SubscribeKey(secondGlobal, "__sys__Event");
         SubscribeQos subQos = new SubscribeQos(secondGlobal);
         conn2.subscribe(subKey, subQos);
         msgInterceptor.clear();
View Full Code Here

         {
            // publish now
            Global global = new Global(args);
            qos = new ConnectQos(global, "testPublisher/1", "secret");
            I_XmlBlasterAccess conn = global.getXmlBlasterAccess();
            conn.connect(qos, this);
            PublishKey pubKey = new PublishKey(global, topicName);
            PublishQos pubQos = new PublishQos(global);
            for (int i=0; i < 5; i++) {
               String content = "This is test " + i;
               conn.publish(new MsgUnit(pubKey, content.getBytes(), pubQos));
View Full Code Here

         {
            Global global = new Global(args);
            qos = new ConnectQos(global, userName + "/" + sessionId, "secret");
            I_XmlBlasterAccess conn = global.getXmlBlasterAccess();
            conn.connect(qos, this);
            Thread.sleep(1000L);
            conn.disconnect(new DisconnectQos(global));
         }
         conn2.disconnect(new DisconnectQos(secondGlobal));
      }
View Full Code Here

            Global global = new Global(args);
            ConnectQos qos = new ConnectQos(global, userName + "/" + sessionId, "secret");
            qos.getSessionCbQueueProperty().setMaxEntries(10L);
            qos.getSessionCbQueueProperty().setMaxEntriesCache(10L);
            I_XmlBlasterAccess conn = global.getXmlBlasterAccess();
            conn.connect(qos, this);
            SubscribeKey subKey = new SubscribeKey(global, topicName);
            SubscribeQos subQos = new SubscribeQos(global);
            conn.subscribe(subKey, subQos);
            // conn.leaveServer(null);
            DisconnectQos disconnectQos = new DisconnectQos(global);
View Full Code Here

         Global secondGlobal = new Global(args);
         MsgInterceptor msgInterceptor = new MsgInterceptor(secondGlobal, log, null);
         ConnectQos qos = new ConnectQos(secondGlobal, "tester/2", "secret");
         I_XmlBlasterAccess conn2 = secondGlobal.getXmlBlasterAccess();
         conn2.connect(qos, msgInterceptor);
         SubscribeKey subKey = new SubscribeKey(secondGlobal, "__sys__Event");
         SubscribeQos subQos = new SubscribeQos(secondGlobal);
         conn2.subscribe(subKey, subQos);
         msgInterceptor.clear();
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.