Examples of Connection

  • 2 ends that can be connected to {@link Gate}.
  • A {@link Path} that provides the path from the first end to the last end @author zxpletran007
  • spark.api.Connection
    A connection to a SPARQL processor. Connections can be used to create commands, get metadata, or be closed.
  • sun.rmi.transport.Connection
  • tv.floe.metronome.classification.neuralnetworks.core.Connection
  • vicazh.hyperpool.stream.Connection
    This class is the superclass of all connections @author Victor Zhigunov @version 0.4.8.3

  • Examples of co.nubetech.crux.model.Connection

       
        Datastore datastore = new Datastore();
        datastore.setId(121212);
        datastore.setName("Hbase");
       
        Connection connection = new Connection();
        ConnectionProperty connectionProperty1 = new ConnectionProperty(connection,
                                      CruxConstants.HBASE_ZOOKEEPER_PROPERTY,"value1");
       
        connection.addProperty(connectionProperty1);
        connection.setDatastore(datastore);
        connection.setId(1);
        connection.setName("Con");
       
        ConnectionView connectionView = new ConnectionView(1,connection);
        assertEquals(connectionView.getName(),"Con");
        assertEquals(connectionView.getHbaseRestServerPropertyValue(),
            connection.getProperties().get(CruxConstants.HBASE_ZOOKEEPER_PROPERTY).getValue());
        assertEquals(connectionView.getDatastoreName(),"Hbase");
      }
    View Full Code Here

    Examples of com.aerospike.client.cluster.Connection

            // Execute command until successful, timed out or maximum iterations have been reached.
        while (true) {
          Node node = null;
          try {   
            node = getNode();
            Connection conn = node.getConnection(remainingMillis);
           
            try {
              // Reset timeout in send buffer (destined for server) and socket.
              Buffer.intToBytes(remainingMillis, sendBuffer, 22);
             
              // Send command.
              send(conn);
             
              // Parse results.
              parseResult(conn.getInputStream());
             
              // Reflect healthy status.
              conn.updateLastUsed();
              node.restoreHealth();
             
              // Put connection back in pool.
              node.putConnection(conn);
             
              // Command has completed successfully.  Exit method.
              return;
            }
            catch (AerospikeException ae) {
              // Close socket to flush out possible garbage.  Do not put back in pool.
              conn.close();
              throw ae;
            }
            catch (RuntimeException re) {
              // All runtime exceptions are considered fatal.  Do not retry.
              // Close socket to flush out possible garbage.  Do not put back in pool.
              conn.close();
              throw re;
            }
            catch (IOException ioe) {
              // IO errors are considered temporary anomalies.  Retry.
              // Close socket to flush out possible garbage.  Do not put back in pool.
              conn.close();
             
              if (Log.debugEnabled()) {
                Log.debug("Node " + node + ": " + Util.getErrorMessage(ioe));
              }
              // IO error means connection to server node is unhealthy.
    View Full Code Here

    Examples of com.alibaba.rocketmq.common.protocol.body.Connection

                        .get(requestHeader.getProducerGroup());
            if (channelInfoHashMap != null) {
                Iterator<Map.Entry<Channel, ClientChannelInfo>> it = channelInfoHashMap.entrySet().iterator();
                while (it.hasNext()) {
                    ClientChannelInfo info = it.next().getValue();
                    Connection connection = new Connection();
                    connection.setClientId(info.getClientId());
                    connection.setLanguage(info.getLanguage());
                    connection.setVersion(info.getVersion());
                    connection.setClientAddr(RemotingHelper.parseChannelRemoteAddr(info.getChannel()));

                    bodydata.getConnectionSet().add(connection);
                }

                byte[] body = bodydata.encode();
    View Full Code Here

    Examples of com.cloud.ovm.object.Connection

      @Override
      public Map<? extends ServerResource, Map<String, String>> find(long dcId,
          Long podId, Long clusterId, URI url, String username,
          String password, List<String> hostTags) throws DiscoveryException {
        Connection conn = null;

        if (!url.getScheme().equals("http")) {
          String msg = "urlString is not http so we're not taking care of the discovery for this: "
              + url;
          s_logger.debug(msg);
          return null;
        }
        if (clusterId == null) {
          String msg = "must specify cluster Id when add host";
          s_logger.debug(msg);
          throw new CloudRuntimeException(msg);
        }

        if (podId == null) {
          String msg = "must specify pod Id when add host";
          s_logger.debug(msg);
          throw new CloudRuntimeException(msg);
        }

        ClusterVO cluster = _clusterDao.findById(clusterId);
        if (cluster == null
            || (cluster.getHypervisorType() != HypervisorType.Ovm)) {
          if (s_logger.isInfoEnabled())
            s_logger.info("invalid cluster id or cluster is not for Ovm hypervisors");
          return null;
        }

        String agentUsername = _params.get("agentusername");
        if (agentUsername == null) {
          throw new CloudRuntimeException("Agent user name must be specified");
        }

        String agentPassword = _params.get("agentpassword");
        if (agentPassword == null) {
          throw new CloudRuntimeException("Agent password must be specified");
        }

        try {
          String hostname = url.getHost();
          InetAddress ia = InetAddress.getByName(hostname);
          String hostIp = ia.getHostAddress();
          String guid = UUID.nameUUIDFromBytes(hostIp.getBytes()).toString();

          if (checkIfExisted(guid)) {
            throw new CloudRuntimeException("The host " + hostIp
                + " has been added before");
          }

          s_logger.debug("Ovm discover is going to disover host having guid "
              + guid);

          ClusterVO clu = _clusterDao.findById(clusterId);
          if (clu.getGuid() == null) {
            clu.setGuid(UUID.randomUUID().toString());
            _clusterDao.update(clusterId, clu);
          }

          com.trilead.ssh2.Connection sshConnection = new com.trilead.ssh2.Connection(
              hostIp, 22);
          sshConnection.connect(null, 60000, 60000);
          sshConnection = SSHCmdHelper.acquireAuthorizedConnection(hostIp,
              username, password);
          if (sshConnection == null) {
            throw new DiscoveryException(
                String.format(
                    "Cannot connect to ovm host(IP=%1$s, username=%2$s, password=%3$s, discover failed",
                    hostIp, username, password));
          }

          if (!SSHCmdHelper.sshExecuteCmd(sshConnection,
              "[ -f '/etc/ovs-agent/agent.ini' ]")) {
            throw new DiscoveryException(
                "Can not find /etc/ovs-agent/agent.ini " + hostIp);
          }

          Map<String, String> details = new HashMap<String, String>();
          OvmResourceBase ovmResource = new OvmResourceBase();
          details.put("ip", hostIp);
          details.put("username", username);
          details.put("password", password);
          details.put("zone", Long.toString(dcId));
          details.put("guid", guid);
          details.put("pod", Long.toString(podId));
          details.put("cluster", Long.toString(clusterId));
          details.put("agentusername", agentUsername);
          details.put("agentpassword", agentPassword);
          if (_publicNetworkDevice != null) {
            details.put("public.network.device", _publicNetworkDevice);
          }
          if (_privateNetworkDevice != null) {
            details.put("private.network.device", _privateNetworkDevice);
          }
          if (_guestNetworkDevice != null) {
            details.put("guest.network.device", _guestNetworkDevice);
          }

          Map<String, Object> params = new HashMap<String, Object>();
          params.putAll(details);
          ovmResource.configure("Ovm Server", params);
          ovmResource.start();

          conn = new Connection(hostIp, "oracle", agentPassword);
          /* After resource start, we are able to execute our agent api */
          OvmHost.Details d = OvmHost.getDetails(conn);
          details.put("agentVersion", d.agentVersion);
          details.put(HostInfo.HOST_OS_KERNEL_VERSION, d.dom0KernelVersion);
          details.put(HostInfo.HYPERVISOR_VERSION, d.hypervisorVersion);
    View Full Code Here

    Examples of com.complexible.stardog.api.Connection

      /**
       * Test method for validating connection configured correctly
       */
      @Test
      public void testBasicSnarl() {
        Connection con = dataSource.getConnection();
        assertNotNull(con);
      }
    View Full Code Here

    Examples of com.cuubez.core.io.Connection

        }


        public void writeResponse(HttpServletRequest request, HttpServletResponse response, ResponseContext responseContext) {

            Connection connection = new HttpConnection();
            connection.write(request, response, responseContext);
        }
    View Full Code Here

    Examples of com.cybozu.vmbkp.soap.Connection

        /**
         * Main method.
         */
        public static void main(String[] args) throws Exception
      {
            Connection conn = new Connection(url_, username_, password_);
            try {
                gm_ = new GlobalManager(conn);

                /* Host and datastore */
                getHostsAndDatastores();
                getDatastores();

                /* Snapshot test */
                createSnapshot();
                deleteSnapshot();

                /* getOvfOfAllVm(); */
                /* exportOvf(); */
                /* importOvf(); */

                /* Export/import ovf test. */
                getInfoAndOvfOfAllVm();
                int num = importAllOvf();
                deleteAllRestoredVm(num);
               
               
            } catch (Exception e) {
                e.printStackTrace();
               
            } finally {
                conn.disconnect();
            }
        }
    View Full Code Here

    Examples of com.dianping.cat.home.nettopo.entity.Connection

            switchB.setState(switchA.getState());
            netTopologyB.addSwitch(switchB);
          }

          for (Connection connectionA : netTopologyA.getConnections()) {
            Connection connectionB = new Connection();
            for (Interface interA : connectionA.getInterfaces()) {
              Interface interB = new Interface();
              interB.setDomain(interA.getDomain());
              interB.setGroup(interA.getGroup());
              interB.setKey(interA.getKey());
              interB.setIn(interA.getIn());
              interB.setOut(interA.getOut());
              interB.setInstate(interA.getInstate());
              interB.setOutstate(interA.getOutstate());
              interB.setInstate(interA.getInstate());
              interB.setOutstate(interA.getOutstate());
              interB.setInDiscardsState(interA.getInDiscardsState());
              interB.setOutDiscardsState(interA.getOutDiscardsState());
              interB.setInErrorsState(interA.getInErrorsState());
              interB.setOutErrorsState(interA.getOutErrorsState());
              connectionB.addInterface(interB);
            }
            connectionB.setInsum(connectionA.getInsum());
            connectionB.setOutsum(connectionA.getOutsum());
            connectionB.setFrom(connectionA.getFrom());
            connectionB.setTo(connectionA.getTo());
            connectionB.setInstate(connectionA.getInstate());
            connectionB.setOutstate(connectionA.getOutstate());
            connectionB.setInDiscardsState(connectionA.getInDiscardsState());
            connectionB.setOutDiscardsState(connectionA.getOutDiscardsState());
            connectionB.setInErrorsState(connectionA.getInErrorsState());
            connectionB.setOutErrorsState(connectionA.getOutErrorsState());
            netTopologyB.addConnection(connectionB);
          }

          to.addNetTopology(netTopologyB);
        }
    View Full Code Here

    Examples of com.digitaldan.jomnilinkII.Connection

             */
           
            logger.debug("OmniConnectionThread trying to connect");
           
            try {
              c = new Connection(host, port, key);
              connected = true;
              logger.debug("OmniConnectionThread connected");
            } catch (Exception e) {
              logger.error("Could not connect", e);
            }
    View Full Code Here

    Examples of com.ds.http.connection.Connection

            System.out.println("Server started...");
            mainExecutor.execute(new Runnable() {
                public void run() {
                    while (isServerAlive) {
                        try {
                            Connection connection = connectionManager.awaitClient();
                            ClientRequestProcessor clientRequestProcessor = new ClientRequestProcessor(connection);
                            clientRequestProcessor.setResourceFinder(new ResourceFinder(webRoot));
                            requestScheduler.schedule(clientRequestProcessor);
                        } catch (IOException e) {
                            e.printStackTrace();
    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.