Class ControlPanel
- Author:
- Christopher Mindus
- Constructor SummaryConstructors
- Method SummaryModifier and TypeMethodDescription- static voidSorts and displays the system properties.- static booleanChecks 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 InetAddressDetermines 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[]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 StringGets the "WHO" string with certificate validity and issuer.- static StringFormats a Principal entry.- static byte[]- getIPv4Address- (String name) Gets the IPv4 byte address.- 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 booleanChecks if system proxies are used by default.
- Constructor Details- ControlPanelpublic ControlPanel()
 
- Method Details- getIPv4AddressGets the IPv4 byte address.- Returns:
- null if not number address.
 
- isLocalhostCheck if it's localhost.
- useSystemProxiespublic static boolean useSystemProxies()Checks if system proxies are used by default.
- doVerifyServerHostNamepublic static boolean doVerifyServerHostName()Checks the setting for HTTPS host name verification.- Returns:
- true if the server host name should be checked, false otherwise.
 
- displaySystemPropertiespublic static void displaySystemProperties()Sorts and displays the system properties.
- initDeployDatapublic static boolean initDeployData- (boolean isVerbose) Initializes the control panel to load the deployment data.- Parameters:
- isVerbose- Flag to display verbose output.
- Returns:
- true for success, false for failure.
 
- readSystemProxiespublic static void readSystemProxies- (boolean isApplet, boolean isVerbose) Get a fresh list of the proxies defined.
- getProxiespublic static ArrayList<Proxy> getProxies- (URL url, ArrayList<Proxy> cmdLineProxies, boolean isVerbose) Gets the proxies to use for a particular host URL.
- getTSGets a timestamp string.
- getByNameDetermines the IP address of a host, given the host's name.- 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. - Parameters:
- host- The specified host, or null.
- isVerbose- Verbose output flag.
- Returns:
- An IP address for the given host name.
- Throws:
- UnknownHostException- if no IP address for the host could be found, or if a scope_id was specified for a global IPv6 address.
 
- getAllByNamepublic static InetAddress[] getAllByName- (String host, boolean isVerbose) throws UnknownHostException Given the name of a host, returns an array of its IP addresses, based on the configured name service on the system.- 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. - Parameters:
- host- host - the name of the host, or null.
- isVerbose- Verbose output flag.
- Returns:
- An array of all the IP addresses for a given host name.
- Throws:
- UnknownHostException- if no IP address for the host could be found, or if a scope_id was specified for a global IPv6 address.
 
- isLocalAddressChecks if it's a local (intranet) host address.- Parameters:
- host- The host name.
- isVerbose- Verbose output flag.
- Returns:
- true if local intranet host address, false otherwise.
 
- getCertificatesLoads the certificates: CA, JSSE and Trusted Certificates (Code Signing). This method can only be called once the method- initDeployData()has been called.- Returns:
- An array of 3 ArrayList<X509Certificate>. The first list contains the CA certificates, the second, the JSSE trusted certificates, and the third the Trusted (code signing) certificates.
 
- getClientCertificatesKeystoreFileNamesGets the file name for the System Client Certificates keystore. This method can only be called once the method- initDeployData()has been called.- Returns:
- The file names for the KeyStore's of System and User, array size of 2. Note: the file might not exist.
 
- getDescriptionFormats a Principal entry.
- getDescriptionGets the "WHO" string with certificate validity and issuer.
- getDeploymentClientCertificatespublic static KeyManager[] getDeploymentClientCertificates- (ICertificateUI callback, boolean isVerbose) Gets the array of client certificates from deployment information.