public Set<String> getNonProxyHosts() { if ( isEnabled() ) { return new HashSet<String>( getCurrentConfiguration( false ).getNonProxyHosts() ); } return Collections.emptySet(); }
public String getHostname() { if ( isEnabled() ) { return getCurrentConfiguration( false ).getProxyHostname(); } return null; }
public boolean isBlockInheritance() { if ( isEnabled() ) { return getCurrentConfiguration( false ).isBlockInheritance(); } return false; }
public int getPort() { if ( isEnabled() ) { return getCurrentConfiguration( false ).getProxyPort(); } return -1; }
public void setNonProxyHosts( Set<String> nonProxyHosts ) { if ( !isEnabled() ) { initConfig(); } getCurrentConfiguration( true ).setNonProxyHosts( new ArrayList<String>( nonProxyHosts ) ); }
public void setPort( int port ) { if ( !isEnabled() ) { initConfig(); } getCurrentConfiguration( true ).setProxyPort( port ); }
public void setBlockInheritance( boolean val ) { if ( !isEnabled() ) { initConfig(); } getCurrentConfiguration( true ).setBlockInheritance( val ); }
public void setHostname( String hostname ) { if ( !isEnabled() ) { initConfig(); } getCurrentConfiguration( true ).setProxyHostname( hostname ); }
public void setProxyAuthentication( RemoteAuthenticationSettings proxyAuthentication ) { if ( !isEnabled() ) { initConfig(); } getCurrentConfiguration( true ).setAuthentication( authenticationInfoConverter .convertToModel( proxyAuthentication ) ); }
public RemoteAuthenticationSettings getProxyAuthentication() { if ( isEnabled() ) { try { return authenticationInfoConverter.convertAndValidateFromModel( getCurrentConfiguration( false ) .getAuthentication() ); } catch ( ConfigurationException e ) { // FIXME: what here?? setProxyAuthentication( null ); return null; } } return null; }