Package org.xmlBlaster.engine.cluster

Examples of org.xmlBlaster.engine.cluster.ClusterNode


          + "<address type='SOCKET'>"
          + "   socket://:7501"
          + "</address>"
          + "</qos></connect>"
          + "   </clusternode>";
         NodeParser nodeParser = new NodeParser(serverScope, new ClusterNode(
               serverScope, new NodeId("avalon"), null), xml);
         Address address = nodeParser.getClusterNode().getNodeInfo()
               .getConnectQosData().getAddress();
         log.info("Address='" + address.getRawAddress().trim() + "'");
         assertEquals("socket://:7501", address.getRawAddress().trim());
View Full Code Here


            + "   socket://:7501"
            + "   <attribute name='useRemoteLoginAsTunnel'>true</attribute>"
            + "</address>"
            + "</qos></connect>"
            + "</clusternode>";
         NodeParser nodeParser = new NodeParser(serverScope, new ClusterNode(
               serverScope, new NodeId("avalon"), null), xml);
         log.info(nodeParser.getClusterNode().toXml());
         Address address = nodeParser.getClusterNode().getNodeInfo()
               .getConnectQosData().getAddress();
         log.info("Address='" + address.getRawAddress().trim() + "'");
View Full Code Here

            "     <cpu id='1' idle='44'/>\n" +
            "     <ram free='12000'/>\n" +
            "   </state>\n" +
            "</clusternode>\n";

         NodeParser nodeParser = new NodeParser(serverScope, new ClusterNode(
               serverScope, new NodeId("avalon"), null), xml);
         ClusterNode clusterNode = nodeParser.getClusterNode();
         log.info(clusterNode.toXml());
        
         Address address = clusterNode.getNodeInfo()
               .getConnectQosData().getAddress();
         assertEquals("IOR:09456087000", address.getRawAddress().trim());
         assertEquals(false, address.getEnv("useRemoteLoginAsTunnel", false)
               .getValue());
        
         NodeMasterInfo[] masters = clusterNode.getNodeMasterInfos();
         assertEquals(2, masters.length);
        
         assertEquals("DomainToMaster", masters[0].getType());
         assertEquals("1.0", masters[0].getVersion());
         assertEquals(0, masters[0].getStratum());
View Full Code Here

         "     <cpu id='1' idle='58'/>\n" +
         "     <ram free='10657'/>\n" +
         "   </state>\n" +
         "</clusternode>\n";

         NodeParser nodeParser = new NodeParser(serverScope, new ClusterNode(
               serverScope, new NodeId("avalon"), null), xml);
         ClusterNode clusterNode = nodeParser.getClusterNode();
         log.info(clusterNode.toXml());
         NodeStateInfo state = clusterNode.getNodeStateInfo();
         assertEquals(10657, state.getFreeRam());
         assertEquals(59, state.getAvgCpuIdle());

      } catch (XmlBlasterException e) {
         e.printStackTrace();
View Full Code Here

               }
               // strip "event/connectionState"
               String name = event.substring(0, index);
               ClusterNode[] nodes = clusterManager.getClusterNodes();
               for (int ic=0; ic<nodes.length; ic++) {
                  ClusterNode node = nodes[ic];
                  SessionName destination = node.getSessionName();
                  if (destination != null && destination.matchRelativeName(name)) {
                     node.registerConnectionListener(this);
                  }
               }
            }
            else if (isCallbackStateEvent(event)) {
            //else if (event.endsWith("/event/callbackState") || event.endsWith("/event/callbackAlive") || event.endsWith("/event/callbackPolling") || event.endsWith("/event/callbackDead")) {
View Full Code Here

      ClusterManager clusterManager = g.getClusterManagerNoEx();
      if (clusterManager != null && clusterManager.isReady()) {
         ClusterNode[] nodes = clusterManager.getClusterNodes();
         for (int ic = 0; ic < nodes.length; ic++) {
            ClusterNode node = nodes[ic];
            SessionName destination = node.getRemoteSessionName();
            if (destination == null)
               continue;
            buf.append("\n  ").append("<connection clusterId='").appendEscaped(destination.getNodeIdStr()).append(
                  "' id='").appendEscaped(destination.getLoginName()).append("'>");
            buf.append("\n   ").append("<session id='").append(destination.getPublicSessionId()).append("'>");
            buf.append("\n    ").append("<state>").append(node.getConnectionStateStr()).append("</state>");
            I_Queue clientQueue = node.getConnectionQueue();
            if (clientQueue != null) {
               buf.append("\n    <queue relating='" + Constants.RELATING_CLIENT + "'"); // "connection"
               buf.append(" numOfEntries='").append(clientQueue.getNumOfEntries()).append("'");
               buf.append(" maxNumOfEntries='").append(clientQueue.getMaxNumOfEntries()).append("'");
               buf.append(" numOfBytes='").append(clientQueue.getNumOfBytes()).append("'");
View Full Code Here

         if (this.subjectName.getLoginName().startsWith(org.xmlBlaster.engine.RequestBroker.internalLoginNamePrefix))
            return null; // don't check for internal logins

         if (glob.isClusterManagerReady()) {
            // Is the client a well known, configured cluster node?
            ClusterNode clusterNode = glob.getClusterManager().getClusterNode(this.subjectName.getLoginName()); // is null if not found
            if (clusterNode != null) {
               nodeId = clusterNode.getNodeId();
            }
            else {
               // Does the client send a tag which marks it as a cluster node?

               SessionInfo ses = getFirstSession();
View Full Code Here

TOP

Related Classes of org.xmlBlaster.engine.cluster.ClusterNode

Copyright © 2018 www.massapicom. 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.