-
- All Known Subinterfaces:
EntityServerConfiguration
public interface ServerConfiguration
Configuration values for aServer
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
ServerConfiguration.Builder<B extends ServerConfiguration.Builder<B>>
A Builder for ServerConfiguration
-
Field Summary
Fields Modifier and Type Field Description static PropertyValue<String>
AUXILIARY_SERVER_FACTORY_CLASS_NAMES
A comma separated list of auxiliary server factories, providing servers to run alongside this Server
Those must extendAuxiliaryServerFactory
.
Value type: String
Default value: nonestatic PropertyValue<String>
CLASSPATH_KEYSTORE
The rmi ssl keystore to use on the classpath, this will be resolved to a temporary file and set as the javax.net.ssl.keyStore system property on server start
Value type: String Default value: nullstatic PropertyValue<Integer>
CONNECTION_MAINTENANCE_INTERVAL_MS
Specifies the interval between server connection maintenance runs, in milliseconds.
Value type: Integer
Default value: 30_000ms (30 seconds)static int
DEFAULT_CONNECTION_MAINTENANCE_INTERVAL
static int
DEFAULT_IDLE_CONNECTION_TIMEOUT
static PropertyValue<Integer>
IDLE_CONNECTION_TIMEOUT
Specifies the default idle client connection timeout in milliseconds.static String
JAVAX_NET_KEYSTORE
The system property key for specifying a ssl keystorestatic String
JAVAX_NET_KEYSTORE_PASSWORD
The system property key for specifying a ssl keystore passwordstatic PropertyValue<String>
KEYSTORE
The rmi ssl keystore to use
Value type: String Default value: nullstatic PropertyValue<String>
KEYSTORE_PASSWORD
The rmi ssl keystore password to use
Value type: String Default value: nullstatic String
LOCALHOST
Localhoststatic PropertyValue<Integer>
REGISTRY_PORT
The port on which to locate the server registry
Value type: Integer
Default value: Registry.REGISTRY_PORT (1099)static PropertyValue<String>
RMI_SERVER_HOSTNAME
Specifies the rmi server hostname
Note that this is the standard Java property 'java.rmi.server.hostname'
Value type: String
Default value: localhoststatic PropertyValue<Boolean>
SERIALIZATION_FILTER_DRYRUN
If true then the serialization whitelist specified bySERIALIZATION_FILTER_WHITELIST
is populated with the names of all deserialized classes on server shutdown.static PropertyValue<String>
SERIALIZATION_FILTER_WHITELIST
The serialization whitelist file to use if anystatic PropertyValue<Integer>
SERVER_ADMIN_PORT
The port on which the server should export the remote admin interface
Value type: Integer
Default value: nullstatic PropertyValue<String>
SERVER_ADMIN_USER
Specifies a username:password combination representing the server admin user
Example: scott:tigerstatic PropertyValue<Boolean>
SERVER_CONNECTION_SSL_ENABLED
Specifies whether the server should establish connections using a secure sockets layer, true (on) or false (off)
Value type: Boolean
Default value: truestatic PropertyValue<String>
SERVER_NAME_PREFIX
Specifies the prefix used when exporting/looking up the Codion server
Value type: String
Default value: Codion Serverstatic PropertyValue<Integer>
SERVER_PORT
The port on which the server is made available to clients.
If specified on the client side, the client will only connect to a server running on this port, use -1 or no value if the client should connect to any available server
Value type: Integer
Default value: -1
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description int
adminPort()
Collection<String>
auxiliaryServerFactoryClassNames()
static <B extends ServerConfiguration.Builder<B>>
ServerConfiguration.Builder<B>builder(int serverPort)
static <B extends ServerConfiguration.Builder<B>>
ServerConfiguration.Builder<B>builder(int serverPort, int registryPort)
static <B extends ServerConfiguration.Builder<B>>
ServerConfiguration.Builder<B>builderFromSystemProperties()
Returns a Builder initialized with values from system properties.int
connectionMaintenanceInterval()
boolean
isSerializationFilterDryRun()
boolean
isSslEnabled()
int
port()
int
registryPort()
RMIClientSocketFactory
rmiClientSocketFactory()
RMIServerSocketFactory
rmiServerSocketFactory()
String
serializationFilterWhitelist()
String
serverName()
-
-
-
Field Detail
-
DEFAULT_IDLE_CONNECTION_TIMEOUT
static final int DEFAULT_IDLE_CONNECTION_TIMEOUT
- See Also:
- Constant Field Values
-
DEFAULT_CONNECTION_MAINTENANCE_INTERVAL
static final int DEFAULT_CONNECTION_MAINTENANCE_INTERVAL
- See Also:
- Constant Field Values
-
JAVAX_NET_KEYSTORE
static final String JAVAX_NET_KEYSTORE
The system property key for specifying a ssl keystore- See Also:
- Constant Field Values
-
JAVAX_NET_KEYSTORE_PASSWORD
static final String JAVAX_NET_KEYSTORE_PASSWORD
The system property key for specifying a ssl keystore password- See Also:
- Constant Field Values
-
LOCALHOST
static final String LOCALHOST
Localhost- See Also:
- Constant Field Values
-
RMI_SERVER_HOSTNAME
static final PropertyValue<String> RMI_SERVER_HOSTNAME
Specifies the rmi server hostname
Note that this is the standard Java property 'java.rmi.server.hostname'
Value type: String
Default value: localhost
-
SERVER_NAME_PREFIX
static final PropertyValue<String> SERVER_NAME_PREFIX
Specifies the prefix used when exporting/looking up the Codion server
Value type: String
Default value: Codion Server
-
SERVER_PORT
static final PropertyValue<Integer> SERVER_PORT
The port on which the server is made available to clients.
If specified on the client side, the client will only connect to a server running on this port, use -1 or no value if the client should connect to any available server
Value type: Integer
Default value: -1
-
REGISTRY_PORT
static final PropertyValue<Integer> REGISTRY_PORT
The port on which to locate the server registry
Value type: Integer
Default value: Registry.REGISTRY_PORT (1099)
-
CLASSPATH_KEYSTORE
static final PropertyValue<String> CLASSPATH_KEYSTORE
The rmi ssl keystore to use on the classpath, this will be resolved to a temporary file and set as the javax.net.ssl.keyStore system property on server start
Value type: String Default value: null
-
KEYSTORE
static final PropertyValue<String> KEYSTORE
The rmi ssl keystore to use
Value type: String Default value: null- See Also:
CLASSPATH_KEYSTORE
-
KEYSTORE_PASSWORD
static final PropertyValue<String> KEYSTORE_PASSWORD
The rmi ssl keystore password to use
Value type: String Default value: null
-
SERVER_ADMIN_PORT
static final PropertyValue<Integer> SERVER_ADMIN_PORT
The port on which the server should export the remote admin interface
Value type: Integer
Default value: null
-
SERVER_ADMIN_USER
static final PropertyValue<String> SERVER_ADMIN_USER
Specifies a username:password combination representing the server admin user
Example: scott:tiger
-
SERVER_CONNECTION_SSL_ENABLED
static final PropertyValue<Boolean> SERVER_CONNECTION_SSL_ENABLED
Specifies whether the server should establish connections using a secure sockets layer, true (on) or false (off)
Value type: Boolean
Default value: true
-
IDLE_CONNECTION_TIMEOUT
static final PropertyValue<Integer> IDLE_CONNECTION_TIMEOUT
Specifies the default idle client connection timeout in milliseconds. Value type: Integer
Default value: 120.000ms (2 minutes)
-
AUXILIARY_SERVER_FACTORY_CLASS_NAMES
static final PropertyValue<String> AUXILIARY_SERVER_FACTORY_CLASS_NAMES
A comma separated list of auxiliary server factories, providing servers to run alongside this Server
Those must extendAuxiliaryServerFactory
.
Value type: String
Default value: none- See Also:
AuxiliaryServer
-
SERIALIZATION_FILTER_WHITELIST
static final PropertyValue<String> SERIALIZATION_FILTER_WHITELIST
The serialization whitelist file to use if any
-
SERIALIZATION_FILTER_DRYRUN
static final PropertyValue<Boolean> SERIALIZATION_FILTER_DRYRUN
If true then the serialization whitelist specified bySERIALIZATION_FILTER_WHITELIST
is populated with the names of all deserialized classes on server shutdown. Note this overwrites the file if it already exists.
-
CONNECTION_MAINTENANCE_INTERVAL_MS
static final PropertyValue<Integer> CONNECTION_MAINTENANCE_INTERVAL_MS
Specifies the interval between server connection maintenance runs, in milliseconds.
Value type: Integer
Default value: 30_000ms (30 seconds)
-
-
Method Detail
-
serverName
String serverName()
- Returns:
- the server name
- See Also:
ServerConfiguration.Builder.serverNameSupplier(Supplier)
-
port
int port()
- Returns:
- the server port
-
registryPort
int registryPort()
- Returns:
- the registry port to use
-
adminPort
int adminPort()
- Returns:
- the port on which to make the server admin interface accessible
-
auxiliaryServerFactoryClassNames
Collection<String> auxiliaryServerFactoryClassNames()
- Returns:
- the class names of auxiliary server factories, providing the servers to run alongside this server
-
isSslEnabled
boolean isSslEnabled()
- Returns:
- true if ssl is enabled
-
rmiClientSocketFactory
RMIClientSocketFactory rmiClientSocketFactory()
- Returns:
- the rmi client socket factory to use, null for default
-
rmiServerSocketFactory
RMIServerSocketFactory rmiServerSocketFactory()
- Returns:
- the rmi server socket factory to use, null for default
-
serializationFilterWhitelist
String serializationFilterWhitelist()
- Returns:
- the serialization whitelist to use, if any
-
isSerializationFilterDryRun
boolean isSerializationFilterDryRun()
- Returns:
- true if a serialization filter dry run should be active
-
connectionMaintenanceInterval
int connectionMaintenanceInterval()
- Returns:
- the interval between server connection maintenance runs, in milliseconds.
-
builder
static <B extends ServerConfiguration.Builder<B>> ServerConfiguration.Builder<B> builder(int serverPort)
- Type Parameters:
B
- the builder type- Parameters:
serverPort
- the server port- Returns:
- a default server configuration
-
builder
static <B extends ServerConfiguration.Builder<B>> ServerConfiguration.Builder<B> builder(int serverPort, int registryPort)
- Type Parameters:
B
- the builder type- Parameters:
serverPort
- the server portregistryPort
- the registry port- Returns:
- a default server configuration
-
builderFromSystemProperties
static <B extends ServerConfiguration.Builder<B>> ServerConfiguration.Builder<B> builderFromSystemProperties()
Returns a Builder initialized with values from system properties.- Type Parameters:
B
- the builder type- Returns:
- a server configuration builder initialized with values from system properties.
-
-