/** * Sets the name for this host. Also reverts the nickname if no custom nickname is set. * * <p>Configures credentials according to new hostname. * * @param hostname Server */ public void setHostname(final String hostname) { if (this.protocol.isHostnameConfigurable()) { this.hostname = hostname.trim(); } else { this.hostname = protocol.getDefaultHostname(); } this.punycode = null; CredentialsConfiguratorFactory.get(this.protocol).configure(this.credentials, this.hostname); }