Package org.xmlBlaster.util.qos

Examples of org.xmlBlaster.util.qos.ConnectQosData.toXml()


            Address addr = connectQosData.getAddress();
            log.info("Trying to connect to node '" + getId() + "' on address '" + addr.getRawAddress() + "' using protocol=" + addr.getType());

            // TODO: Check if physical IP:PORT is identical
            if (this.fatherGlob.getClusterManager().getMyClusterNode().getId().equals(getId())) {
               log.severe("We want to connect to ourself, route to node'" + getId() + "' ignored: ConnectQos=" + connectQosData.toXml());
               return null;
            }
            if (log.isLoggable(Level.FINEST)) log.finest("Connecting to other cluster node, ConnectQos=" + connectQosData.toXml());

            ConnectQos connectQos = new ConnectQos(this.remoteGlob, connectQosData);
View Full Code Here


            // TODO: Check if physical IP:PORT is identical
            if (this.fatherGlob.getClusterManager().getMyClusterNode().getId().equals(getId())) {
               log.severe("We want to connect to ourself, route to node'" + getId() + "' ignored: ConnectQos=" + connectQosData.toXml());
               return null;
            }
            if (log.isLoggable(Level.FINEST)) log.finest("Connecting to other cluster node, ConnectQos=" + connectQosData.toXml());

            ConnectQos connectQos = new ConnectQos(this.remoteGlob, connectQosData);
            if (useRemoteLoginAsTunnel) {
               // We switch off callback ping, it is not yet implemented to handle pings from remote
               // We don't need those pings as the other side is responsible to take care on the socket connection
View Full Code Here

      // Persist it
      StorageId storageId = null;
      if (sessionInfo.getPersistenceUniqueId() == 0) {
         long uniqueId = new Timestamp().getTimestamp(); // new session
         SessionEntry entry = new SessionEntry(connectQosData.toXml(), uniqueId, connectQosData.size(), storageId);
         if (log.isLoggable(Level.FINE)) log.fine("addSession (persistent) for NEW uniqueId: '" + entry.getUniqueId() + "'");
         sessionInfo.setPersistenceUniqueId(uniqueId);
         this.sessionStore.put(entry);
      }
      else {
View Full Code Here

         // session exists? -> update
         final long uniqueId = sessionInfo.getPersistenceUniqueId();
         this.sessionStore.change(uniqueId, new I_ChangeCallback() {
            public I_MapEntry changeEntry(I_MapEntry mapEntry)
                  throws XmlBlasterException {
               SessionEntry sessionEntry = new SessionEntry(connectQosData.toXml(), uniqueId, connectQosData.size(),
                     null);
               if (log.isLoggable(Level.FINE)) log.fine("changeSession (persistent) for uniqueId: '" + sessionEntry.getUniqueId() + "'");
               return sessionEntry;
            }
         });
View Full Code Here

      // TODO add a method I_Queue.removeRandom(long uniqueId)
      long uniqueId = sessionInfo.getPersistenceUniqueId();
      if (log.isLoggable(Level.FINE)) log.fine("sessionRemoved (persistent) for uniqueId: '" + uniqueId + "'");
      // String sessionId = getOriginalSessionId(connectQosData.getSessionQos().getSecretSessionId());
      SessionEntry entry = new SessionEntry(connectQosData.toXml(), uniqueId, 0L, null);
      int num = this.sessionStore.remove(entry);
      if (num != 1) {
         XmlBlasterException ex = sessionInfo.getTransportConnectFail();
         if (ex != null)
            log.fine("sessionRemoved (persistent) for uniqueId: '" + uniqueId + "' failed, entry not found.");
View Full Code Here

         "</qos>\n";

         I_ConnectQosFactory factory = this.glob.getConnectQosFactory();
         ConnectQosData qos = factory.readObject(xml); // parse
         assertEquals("", true, qos.getPersistentProp().getValue());
         String newXml = qos.toXml();                  // dump
         qos = factory.readObject(newXml);             // parse again

         if (log.isLoggable(Level.FINE)) log.fine("ORIG=\n" + xml + "\n NEW=\n" + newXml);

         SessionQos sessionQos = qos.getSessionQos();
View Full Code Here

         "  </queue>\n" +
         " </qos>\n";

         I_ConnectQosFactory factory = this.glob.getConnectQosFactory();
         ConnectQosData qos = factory.readObject(xml); // parse
         String newXml = qos.toXml();                  // dump
         qos = factory.readObject(newXml);             // parse again

         if (log.isLoggable(Level.FINE)) log.fine("ORIG=\n" + xml + "\n NEW=\n" + newXml);
        
         ClientQueueProperty prop = qos.getClientQueueProperty();
View Full Code Here

         if (log.isLoggable(Level.FINE)) log.fine("ORIG=\n" + xml + "\n NEW=\n" + newXml);
        
         ClientQueueProperty prop = qos.getClientQueueProperty();
         assertEquals("", "RAM", prop.getType());
         assertEquals("", "1.0", prop.getVersion());
         System.out.println(qos.toXml());
      }
      catch (XmlBlasterException e) {
         fail("testParse2 failed: " + e.toString());
      }
View Full Code Here

         "   </queue>\n" +
         "</qos>\n";

         I_ConnectQosFactory factory = this.glob.getConnectQosFactory();
         ConnectQosData qos = factory.readObject(xml); // parse
         String newXml = qos.toXml();                  // dump
         qos = factory.readObject(newXml);             // parse again

         if (log.isLoggable(Level.FINE)) log.fine("ORIG=\n" + xml + "\n NEW=\n" + newXml);

         {
View Full Code Here

               + "      <attribute name='useRemoteLoginAsTunnel'>true</attribute>\n"
               + "   </address>\n" + "</qos>\n";

         ConnectQosData qos = factory.readObject(xml);

         String xml2 = qos.toXml();
         qos = factory.readObject(xml2);
         log.info(xml2);

         assertTrue(qos.isPersistent());
         Address address = qos.getAddress();
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.