|
org.openide.util 8.19.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openide.util.NetworkSettings
public final class NetworkSettings
Useful static methods for getting Network Proxy required for make network connection for specified resource.
| Nested Class Summary | |
|---|---|
static class |
NetworkSettings.ProxyCredentialsProvider
Allows NetBeans Platform users to provide own proxy and network credentials separately. |
| 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. |
|
static boolean |
isAuthenticationDialogSuppressed()
A utility method for implementations of Authenticator
to suppress asking users a authentication question while running code posted
in authenticationDialogSuppressed. |
|
static
|
suppressAuthenticationDialog(Callable<R> blockOfCode)
Suppress asking user a question about the authentication credentials while running blockOfCode. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NetworkSettings()
| Method Detail |
|---|
public static String getProxyHost(URI u)
hostname part of network proxy address
based on given URI to access the resource at.
Returns null for direct connection.
u - The URI that a connection is required to
nullpublic static String getProxyPort(URI u)
port part of network proxy address
based on given URI to access the resource at.
Returns null for direct connection.
u - The URI that a connection is required to
nullpublic static String getAuthenticationUsername(URI u)
username for Proxy Authentication.
Returns null if no authentication required.
u - The URI that a connection is required to
nullpublic static String getKeyForAuthenticationPassword(URI u)
key for reading password for Proxy Authentication.
Use org.netbeans.api.keyring.Keyring for reading the password from the ring.
Returns null if no authentication required.
u - The URI that a connection is required to
null
public static <R> R suppressAuthenticationDialog(Callable<R> blockOfCode)
throws Exception
blockOfCode. It's a contract with NetBeans implementation
of Authenticator.
In case a system is using other Authenticator implementation, it must call isAuthenticationDialogSuppressed() method.
blockOfCode - Callable containing code which will be executed while authentication is suppressed
blockOfCode and may throw an exception.
ExceptionisAuthenticationDialogSuppressed()public static boolean isAuthenticationDialogSuppressed()
Authenticator
to suppress asking users a authentication question while running code posted
in authenticationDialogSuppressed.
authenticationDialogSuppressed method.authenticationDialogSuppressed
|
org.openide.util 8.19.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||