Package org.xmlBlaster.client

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


            I_XmlBlasterAccess xmlBlasterAccess = glob.getXmlBlasterAccess();
            HttpPushHandler pushHandler = new HttpPushHandler(req, res, sessionId,
                                                     connectQos.getSessionName().getRelativeName(),
                                                     xmlBlasterAccess);

            xmlBlasterAccess.connect(connectQos, pushHandler);
            if (!session.isNew()) {
               pushHandler.startPing();
            }
            else {
               log.info("Login action, browser has not yet joined this sessionId (cookie), so first pings pong may return an invalid sessionId");
View Full Code Here


      I_XmlBlasterAccess xmlBlasterAccess = glob.getXmlBlasterAccess();
      PushHandler pushHandler = new PushHandler(req, res, session.getId(),
                                               connectQos.getSessionName().getRelativeName(),
                                               xmlBlasterAccess, this.timeout);
      xmlBlasterAccess.connect(connectQos, pushHandler);
      pushHandler.startPing();
      String key = "PushHandler"+getParameter(req, "appletInstanceCount", "0");
      session.setAttribute(key, pushHandler);

      // Don't fall out of doGet() to keep the HTTP connection open
View Full Code Here

      try {
         log.info("Connecting ...");
         Global globSub = this.glob.getClone(null);
         I_XmlBlasterAccess con = globSub.getXmlBlasterAccess();
         ConnectQos qos = new ConnectQos(globSub, name, passwd);
         con.connect(qos, this); // Login to xmlBlaster

         try {
            Client.shutdownCb(con, Client.Shutdown.KEEP_LOGGED_IN);
         }
         catch (Throwable e) {
View Full Code Here

         connectQos.setMaxSessions(1);
         connectQos.setPtpAllowed(true);
         connectQos.setSessionTimeout(0L);
         String sessionName = REPL_MANAGER_SESSION;
         connectQos.setSessionName(new SessionName(this.global, sessionName));
         conn.connect(connectQos, this);
        
         // this is the instance passed from the outside, not a clone, otherwise
         // it will not find the plugin registry for the MIME plugin
         putObject("org.xmlBlaster.engine.Global", global);
         getEngineGlobal(this.global).getPluginRegistry().register(getType() + "," + getVersion(), this);
View Full Code Here

   public static void main(String[] args) {
      try {
         Global global = new Global(args);
         I_XmlBlasterAccess conn = global.getXmlBlasterAccess();
         ConnectQos connectQos = new ConnectQos(global);
         conn.connect(connectQos, new ReplManagerPlugin()); // just a fake
        
         String cmd = global.getProperty().get("cmd", (String)null);
         if (cmd == null)
            mainUsage();
        
View Full Code Here

      this.consuming = this.glob.getProperty().get("consuming", consuming);
      this.queueOid = this.glob.getProperty().get("queueOid", "topic/Hello");
     
      try {
         ConnectQos qos = new ConnectQos(glob);
         con.connect(qos, null)// Login to xmlBlaster
        
         Thread thread = new Thread(new Runnable() {
            public void run() {
               while (true) {
                  try {
View Full Code Here

         // (This is redundant as it is done by ConnectQos already)
         String name = glob.getProperty().get("session.name", "HelloWorld3");
         String passwd = glob.getProperty().get("passwd", "secret");

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


         PublishKey pk = new PublishKey(glob, "HelloWorld3", "text/xml", "1.0");
         pk.setClientTags("<org.xmlBlaster><demo/></org.xmlBlaster>");
         PublishQos pq = new PublishQos(glob);
View Full Code Here

   public HelloWorld2(final Global glob) {
      try {
         I_XmlBlasterAccess con = glob.getXmlBlasterAccess();

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

         con.subscribe("<key oid='HelloWorld2'/>", "<qos/>");
        
         // A similar subscription with XPATH:
         //con.subscribe("<key oid='' queryType='XPATH'>//key[@oid='HelloWorld2']</key>", "<qos/>");
View Full Code Here

         I_XmlBlasterAccess con = glob.getXmlBlasterAccess();
         log.info("============= CreatingConnectQos");
         ConnectQos qos = new ConnectQos(glob);
         log.info("ConnectQos is " + qos.toXml());
         ConnectReturnQos crq = con.connect(qos, null)// Login to xmlBlaster, register for updates
         log.info("Connect success as " + crq.toXml());

         if (interactive) {
            log.info("Hit a key to erase");
            try { System.in.read(); } catch(java.io.IOException e) {}
View Full Code Here

         // '-dispatch/connection/doSendConnect false' on command line would do the same
         qos.doSendConnect(false);
        
         // Initializes everything but does NOT send connect message
         con.connect(qos, this);

         log.info("Waiting now for updates ...");
         char ret = 0;
         while (ret != 'q')
            ret = (char)Global.waitOnKeyboardHit("Enter 'q' to quit");
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.