Class Clients

java.lang.Object
is.codion.common.rmi.client.Clients

public final class Clients extends Object
Utility methods for remote clients
  • Field Details

    • TRUSTSTORE

      public static final PropertyValue<String> TRUSTSTORE
      The rmi ssl truststore to use, in the filesystem or on the classpath, its certificates trusted along with the ones trusted by default
      • Value type: String
      • Default value: null
      See Also:
    • TRUSTSTORE_PASSWORD

      public static final PropertyValue<String> TRUSTSTORE_PASSWORD
      The rmi ssl truststore password to use
      • Value type: String
      • Default value: null, changeit being used
    • SERVER_HOSTNAME

      public static final PropertyValue<String> SERVER_HOSTNAME
      The host on which to locate the server
      • Value type: String
      • Default value: localhost
  • Method Details

    • sslContext

      public static Optional<SSLContext> sslContext()
      Returns the SSLContext trusting the certificates in the truststore specified by TRUSTSTORE, along with the ones trusted by default, which the client socket factory of a server with ssl enabled creates its sockets with. The context is created once for a truststore and password, the default context and the javax.net.ssl system properties left as they are.
      Returns:
      the ssl context, an empty Optional in case no truststore is specified, the default context then applying
      Throws:
      IllegalStateException - in case the truststore can not be read, found neither in the filesystem nor on the classpath, or its password incorrect
      See Also: