org.openide.util 8.15.1

org.openide.util
Class NetworkSettings

java.lang.Object
  extended by org.openide.util.NetworkSettings

public final class NetworkSettings
extends Object

Useful static methods for getting Network Proxy required for make network connection for specified resource.

Since:
8.13

Constructor Summary
NetworkSettings()
           
 
Method Summary
static String getAuthenticationUsername(URI u)
          Returns the username for Proxy Authentication.
static String getKeyForAuthenticationPassword(URI u)
          Returns the key for reading password for Proxy Authentication.
static String getProxyHost(URI u)
          Returns the hostname part of network proxy address based on given URI to access the resource at.
static String getProxyPort(URI u)
          Returns the port part of network proxy address based on given URI to access the resource at.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NetworkSettings

public NetworkSettings()
Method Detail

getProxyHost

public static String getProxyHost(URI u)
Returns the hostname part of network proxy address based on given URI to access the resource at. Returns null for direct connection.

Parameters:
u - The URI that a connection is required to
Returns:
the hostname part of the Proxy address

getProxyPort

public static String getProxyPort(URI u)
Returns the port part of network proxy address based on given URI to access the resource at. Returns null for direct connection.

Parameters:
u - The URI that a connection is required to
Returns:
the port part of the Proxy address

getAuthenticationUsername

public static String getAuthenticationUsername(URI u)
Returns the username for Proxy Authentication. Returns null if no authentication required.

Parameters:
u - The URI that a connection is required to
Returns:
username for Proxy Authentication

getKeyForAuthenticationPassword

public static String getKeyForAuthenticationPassword(URI u)
Returns the key for reading password for Proxy Authentication. Use Keyring for reading the password from the ring. Returns null if no authentication required.

Parameters:
u - The URI that a connection is required to
Returns:
the key for reading password for Proxy Authentication from the ring

org.openide.util 8.15.1

Built on December 5 2011.  |  Portions Copyright 1997-2011 Sun Microsystems, Inc. All rights reserved.