Package org.xmlBlaster.client

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


         I_XmlBlasterAccess conn = this.global.getXmlBlasterAccess();
         if (this.sqlTopic != null) {
            UnSubscribeKey key = new UnSubscribeKey(this.global, this.sqlTopic);
            conn.unSubscribe(key, new UnSubscribeQos(this.global));
         }
         conn.disconnect(new DisconnectQos(this.global));
         this.replications.clear();
         this.replSlaveMap.clear();
         this.topicToPrefixMap.clear();
         this.counterMap.clear();
        
View Full Code Here


            if (line != null && line.trim().length() > 0) {
               conn.publish(msg);
            }
         }
         conn.erase(new EraseKey(global, "broadcastChecker"), new EraseQos(global));
         conn.disconnect(new DisconnectQos(global));
         br.close();
      }
      catch (Throwable ex) {
         ex.printStackTrace();
      }
View Full Code Here

         thread.start();

         while (!stopThis)
            try { Thread.sleep(100); } catch (InterruptedException e) {}

         con.disconnect(new DisconnectQos(glob));
         glob.shutdown(); // free resources
      }
      catch (XmlBlasterException e) {
         log.severe(e.getMessage());
      }
View Full Code Here

         EraseQos eq = new EraseQos(glob);
         EraseReturnQos[] eraseArr = con.erase(ek, eq);
         if (eraseArr.length > 0) log.info("Erased topic");

         DisconnectQos dq = new DisconnectQos(glob);
         con.disconnect(dq);
         glob.shutdown(); // free resources
      }
      catch (XmlBlasterException e) {
         log.severe(e.getMessage());
      }
View Full Code Here

         try { Thread.sleep(1000); } catch(Exception e) { }
         Global.waitOnKeyboardHit("\nHit a key to logout and terminate ...");

         con.erase("<key oid='HelloWorld2'/>", null);
         try { Thread.sleep(100); } catch(Exception e) { }  // To process erase event
         con.disconnect(null);
      }
      catch (Exception e) {
         System.err.println(e.getMessage());
      }
   }
View Full Code Here


         if (ret == 0 || ret == 'd') {
            DisconnectQos dq = new DisconnectQos(glob);
            dq.clearClientQueue(true);
            con.disconnect(dq);
            log.info("Disconnected from server, all resources released");
         }
         else {
            con.leaveServer(null);
            ret = 0;
View Full Code Here

         log.info("Hit a key to exit");
         try { System.in.read(); } catch(java.io.IOException e) {}

         DisconnectQos dq = new DisconnectQos(glob);
         con.disconnect(dq);
      }
      catch (XmlBlasterException e) {
         log.severe(e.getMessage());
      }
      catch (Exception e) {
View Full Code Here

         log.info("Waiting now for updates ...");
         char ret = 0;
         while (ret != 'q')
            ret = (char)Global.waitOnKeyboardHit("Enter 'q' to quit");
        
         con.disconnect(null); // Cleanup client library
      }
      catch (XmlBlasterException e) {
         log.severe(e.getMessage());
      }
      catch (Throwable e) {
View Full Code Here

         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");

         con.disconnect(null);
      }
      catch (Exception e) {
         System.err.println("HelloWorld: We have a problem: " + e.toString());
      }
   }
View Full Code Here

         log.info("Hit a key to exit");
         try { System.in.read(); } catch(java.io.IOException e) {}

         if (disconnect) {
            DisconnectQos dq = new DisconnectQos(glob);
            con.disconnect(dq);
         }
      }
      catch (XmlBlasterException e) {
         log.severe(e.getMessage());
      }
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.