public class ControlPanel extends Object
Constructor and Description |
---|
ControlPanel() |
Modifier and Type | Method and Description |
---|---|
static void |
displaySystemProperties()
Sorts and displays the system properties.
|
static boolean |
doVerifyServerHostName()
Checks the setting for HTTPS host name verification.
|
static InetAddress[] |
getAllByName(String host,
boolean isVerbose)
Given the name of a host, returns an array of its IP addresses, based on the configured name service on the system.
|
static InetAddress |
getByName(String host,
boolean isVerbose)
Determines the IP address of a host, given the host's name.
|
static HashSet<X509Certificate>[] |
getCertificates(boolean isVerbose)
Loads the certificates: CA, JSSE and Trusted Certificates (Code Signing).
|
static String[] |
getClientCertificatesKeystoreFileNames()
Gets the file name for the System Client Certificates keystore.
|
static KeyManager[] |
getDeploymentClientCertificates(ICertificateUI callback,
boolean isVerbose)
Gets the array of client certificates from deployment information.
|
static String |
getDescription(Principal p)
Formats a Principal entry.
|
static String |
getDescription(X509Certificate c)
Gets the "WHO" string with certificate validity and issuer.
|
static byte[] |
getIPv4Address(String name)
Gets the IPv4 byte address.
|
static ArrayList<Proxy> |
getProxies(URL url,
ArrayList<Proxy> cmdLineProxies,
boolean isVerbose)
Gets the proxies to use for a particular host URL.
|
static String |
getTS()
Gets a timestamp string.
|
static boolean |
initDeployData(boolean isVerbose)
Initializes the control panel to load the deployment data.
|
static boolean |
isLocalAddress(String host,
boolean isVerbose)
Checks if it's a local (intranet) host address.
|
static boolean |
isLocalhost(String name)
Check if it's localhost.
|
static void |
readSystemProxies(boolean isApplet,
boolean isVerbose)
Get a fresh list of the proxies defined.
|
static boolean |
useSystemProxies()
Checks if system proxies are used by default.
|
public static byte[] getIPv4Address(String name)
public static boolean isLocalhost(String name)
public static boolean useSystemProxies()
public static boolean doVerifyServerHostName()
public static void displaySystemProperties()
public static boolean initDeployData(boolean isVerbose)
isVerbose
- Flag to display verbose output.public static void readSystemProxies(boolean isApplet, boolean isVerbose)
public static ArrayList<Proxy> getProxies(URL url, ArrayList<Proxy> cmdLineProxies, boolean isVerbose)
public static String getTS()
public static InetAddress getByName(String host, boolean isVerbose) throws UnknownHostException
The host name can either be a machine name, such as "java.sun.com", or a textual representation of its IP address. If a literal IP address is supplied, only the validity of the address format is checked.
If the host is null then an InetAddress representing an address of the loop-back interface is returned.
host
- The specified host, or null.isVerbose
- Verbose output flag.UnknownHostException
- if no IP address for the host could be found, or if a scope_id was specified for a global IPv6 address.public static InetAddress[] getAllByName(String host, boolean isVerbose) throws UnknownHostException
The host name can either be a machine name, such as "java.sun.com", or a textual representation of its IP address. If a literal IP address is supplied, only the validity of the address format is checked.
For host specified in literal IPv6 address, either the form defined in RFC 2732 or the literal IPv6 address format defined in RFC 2373 is accepted. A literal IPv6 address may also be qualified by appending a scoped zone identifier or scope_id.
If the host is null then an InetAddress representing an address of the loop-back interface is returned.
host
- host - the name of the host, or null.isVerbose
- Verbose output flag.UnknownHostException
- if no IP address for the host could be found, or if a scope_id was specified for a global IPv6 address.public static boolean isLocalAddress(String host, boolean isVerbose)
host
- The host name.isVerbose
- Verbose output flag.public static HashSet<X509Certificate>[] getCertificates(boolean isVerbose)
initDeployData()
has been called.ArrayList<X509Certificate>
. The first
list contains the CA certificates, the second, the JSSE trusted certificates,
and the third the Trusted (code signing) certificates.public static String[] getClientCertificatesKeystoreFileNames()
initDeployData()
has been called.public static String getDescription(X509Certificate c)
public static KeyManager[] getDeploymentClientCertificates(ICertificateUI callback, boolean isVerbose)
iizi® is a registered trademark of Mindus SARL. © Copyright Mindus SARL, 2020. All rights reserved.