Class Clients
java.lang.Object
is.codion.common.rmi.client.Clients
Utility methods for remote clients
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PropertyValue<String> The host on which to locate the server Value type: String Default value: localhoststatic final PropertyValue<String> 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: nullstatic final PropertyValue<String> The rmi ssl truststore password to use Value type: String Default value: null, changeit being used -
Method Summary
Modifier and TypeMethodDescriptionstatic Optional<SSLContext> Returns theSSLContexttrusting the certificates in the truststore specified byTRUSTSTORE, along with the ones trusted by default, which the client socket factory of a server with ssl enabled creates its sockets with.
-
Field Details
-
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
The rmi ssl truststore password to use- Value type: String
- Default value: null, changeit being used
-
SERVER_HOSTNAME
The host on which to locate the server- Value type: String
- Default value: localhost
-
-
Method Details
-
sslContext
Returns theSSLContexttrusting the certificates in the truststore specified byTRUSTSTORE, 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 thejavax.net.sslsystem 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:
-