Examples of NioClient


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

Examples of com.tinkerpop.gremlin.driver.simple.NioClient

        }
    }

    @Test
    public void shouldWorkOverNioTransport() throws Exception {
        try (SimpleClient client = new NioClient()) {
            final RequestMessage request = RequestMessage.build(Tokens.OPS_EVAL)
                    .addArg(Tokens.ARGS_GREMLIN, "[1,2,3,4,5,6,7,8,9,0]").create();

            // should be 2 responses when you include the terminator
            final CountDownLatch latch = new CountDownLatch(2);
            client.submit(request, r -> latch.countDown());

            assertTrue(latch.await(500, TimeUnit.MILLISECONDS));
        }
    }
View Full Code Here

Examples of sc.nio.NioClient

      // Log start header info
      logger.info("Client version             : " + Client.VERSION);

      // Create an NioClient instance and start its thread
      NioClient nioclient = new NioClient();
      nioclient.setLogIO(true);
      NioConnection nioconnection = nioclient.connect(InetAddress.getByName(host), port);
      Thread t = new Thread(nioclient);
      t.setDaemon(true);
      t.start();

      // Create the OpenGL display context
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.