Package com.cloud.utils.nio

Examples of com.cloud.utils.nio.NioClient


          s_logger.debug("Skipping " + agentIp + " because " + guidWithTail + " is already in the database.");
          return null;
        }
         
          // bootstrap SCVMM agent to connect back to management server
          NioClient _connection = new NioClient("HypervAgentClient", url.getHost(), 9000, 1, this)
          _connection.start();

          StartupVMMAgentCommand cmd = new StartupVMMAgentCommand(
              dcId,
              podId,
              clusterName,
              guid,
              InetAddress.getLocalHost().getHostAddress(),
              "8250",
              HypervServerDiscoverer.class.getPackage().getImplementationVersion());
         
          // send bootstrap command to agent running on SCVMM host 
          s_logger.info("sending bootstrap request to SCVMM agent on host "+ url.getHost());
          Request request = new Request(0, 0, cmd, false);

          // :FIXME without sleep link.send failing why??????
          Thread.currentThread().sleep(5000);
          _link.send(request.toBytes());

          //wait for SCVMM agent to connect back
      HostVO connectedHost = waitForHostConnect(dcId, podId, clusterId, guidWithTail);
      if (connectedHost == null)
      {
        s_logger.info("SCVMM agent did not connect back after sending bootstrap request");
        return null;
      }

          //disconnect
      s_logger.info("SCVMM agent connected back after sending bootstrap request");
          _connection.stop();       
 
          Map<HypervDummyResourceBase, Map<String, String>> resources = new HashMap<HypervDummyResourceBase, Map<String, String>>();
          Map<String, String> details = new HashMap<String, String>();
          Map<String, Object> params = new HashMap<String, Object>();
          HypervDummyResourceBase resource = new HypervDummyResourceBase();
View Full Code Here

TOP

Related Classes of com.cloud.utils.nio.NioClient

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.