Package org.jclouds.ssh.jsch

Examples of org.jclouds.ssh.jsch.JschSshClient$Connection


            }
            final AbstractOutboundConnectionService outboundConnectionService = (AbstractOutboundConnectionService) serviceController.getValue();
            try {
                final IoFuture<Connection> futureConnection = outboundConnectionService.connect();
                // TODO: Make the timeout configurable
                final Connection connection = IoFutureHelper.get(futureConnection, DEFAULT_CONNECTION_TIMEOUT, TimeUnit.MILLISECONDS);
                logger.debug("Successful reconnect attempt#" + this.reconnectAttemptCount + " to outbound connection " + this.outboundConnectionServiceName);
                // successfully reconnected so unregister this reconnect handler
                this.clientContext.unregisterReconnectHandler(this);
                // register the newly reconnected connection
                final EJBReceiver receiver = new RemotingConnectionEJBReceiver(connection, this, OptionMap.EMPTY);
View Full Code Here


    private void connectionClosed() {
        if(! reconnect.get()) {
            return; // Nothing to do
        }
        // Wait until the connection is closed before reconnecting
        final Connection connection = this.connection;
        if(connection != null) {
            if(channel == null) {
                connection.closeAsync();
            }
        } else {
            if(reconnecting.compareAndSet(false, true)) {
                HostControllerLogger.ROOT_LOGGER.lostRemoteDomainConnection();
                executorService.execute(new Runnable() {
View Full Code Here

     *
     * @param connectionURI the new connection URI
     */
    protected void reconfigure(final URI connectionURI) {
        configuration.setUri(connectionURI);
        final Connection connection = this.connection;
        if(connection != null) {
            connection.closeAsync();
        }
    }
View Full Code Here

        return true;
    }

    private boolean connectUsingRemoting(CommandContext cmdCtx, RemotingMBeanServerConnection rmtMBeanSvrConn)
            throws IOException, CliInitializationException {
        Connection conn = rmtMBeanSvrConn.getConnection();
        Channel channel;
        final IoFuture<Channel> futureChannel = conn.openChannel("management", OptionMap.EMPTY);
        IoFuture.Status result = futureChannel.await(5, TimeUnit.SECONDS);
        if (result == IoFuture.Status.DONE) {
            channel = futureChannel.get();
        } else {
            return false;
View Full Code Here

            this.connectionFuture = connectionFuture;
        }

        @Override
        public Connection connect() throws IOException {
            final Connection connection = openConnection();
            HostControllerLogger.ROOT_LOGGER.reconnectedToMaster();
            return connection;
        }
View Full Code Here

         this.injector = checkNotNull(injector, "injector");
      }

      @Override
      public SshClient create(HostAndPort socket, LoginCredentials credentials) {
         SshClient client = new JschSshClient(proxyConfig, backoffLimitedRetryHandler, socket, credentials, timeout, getAgentConnector());
         injector.injectMembers(client);// add logger
         return client;
      }
View Full Code Here

         this.injector = checkNotNull(injector, "injector");
      }

      @Override
      public SshClient create(HostAndPort socket, LoginCredentials credentials) {
         SshClient client = new JschSshClient(proxyConfig, backoffLimitedRetryHandler, socket, credentials, timeout);
         injector.injectMembers(client);// add logger
         return client;
      }
View Full Code Here

         this.injector = checkNotNull(injector, "injector");
      }

      @Override
      public SshClient create(HostAndPort socket, LoginCredentials credentials) {
         SshClient client = new JschSshClient(proxyConfig, backoffLimitedRetryHandler, socket, credentials, timeout, getAgentConnector());
         injector.injectMembers(client);// add logger
         return client;
      }
View Full Code Here

         this.injector = checkNotNull(injector, "injector");
      }

      @Override
      public SshClient create(HostAndPort socket, LoginCredentials credentials) {
         SshClient client = new JschSshClient(proxyConfig, backoffLimitedRetryHandler, socket, credentials, timeout);
         injector.injectMembers(client);// add logger
         return client;
      }
View Full Code Here

         this.injector = checkNotNull(injector, "injector");
      }

      @Override
      public SshClient create(HostAndPort socket, LoginCredentials credentials) {
         SshClient client = new JschSshClient(proxyConfig, backoffLimitedRetryHandler, socket, credentials, timeout, getAgentConnector());
         injector.injectMembers(client)// add logger
         return client;
      }
View Full Code Here

TOP

Related Classes of org.jclouds.ssh.jsch.JschSshClient$Connection

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.