public SshHostConfiguration getHost(String hostName) { if (hosts != null) { for (SshHostConfiguration host : hosts) { if (hostName.equals(host.getHostName())) { return host; } } } return null; }
public SshHostConfiguration path(String path) { setPath(path); return this; }
host = sshHostConfig.getHostName(); if (Strings.isNullOrBlank(host)) { throw new IllegalArgumentException("Missing host property in the ssh configuration: " + sshHostConfig); preferredAddress = sshHostConfig.getPreferredAddress(); if (Strings.isNullOrBlank(preferredAddress)) { preferredAddress = host; path = sshHostConfig.getPath(); if (Strings.isNullOrBlank(path)) { if (sshHosts != null) { Integer portValue = sshHostConfig.getPort(); if (portValue == null) { if (sshHosts != null) { username = sshHostConfig.getUsername(); if (Strings.isNullOrBlank(username)) { if (sshHosts != null) { password = sshHostConfig.getPassword(); if (Strings.isNullOrBlank(password)) { if (sshHosts != null) { passPhrase = sshHostConfig.getPassPhrase(); if (Strings.isNullOrBlank(passPhrase)) { if (sshHosts != null) { privateKeyFile = sshHostConfig.getPrivateKeyFile();
/** * Returns the host configuration for the given host name; lazily creating a new one if one does not exist yet */ public SshHostConfiguration host(String hostName) { SshHostConfiguration answer = getHost(hostName); if (answer == null) { answer = new SshHostConfiguration(hostName); addHost(answer); } return answer; }
/** * Returns the host configuration for the given host name; lazily creating a new one if one does not exist yet */ public SshHostConfiguration host(String hostName) { SshHostConfiguration answer = getHost(hostName); if (answer == null) { answer = new SshHostConfiguration(hostName); addHost(answer); } return answer; }
public SshHostConfiguration getHost(String hostName) { if (hosts != null) { for (SshHostConfiguration host : hosts) { if (hostName.equals(host.getHostName())) { return host; } } } return null; }
public SshHostConfiguration path(String path) { setPath(path); return this; }