T
- the type of remote interface this server supplies to clientsA
- the type of the admin interface this server suppliespublic interface Server<T extends java.rmi.Remote,A extends java.rmi.Remote>
extends java.rmi.Remote
Modifier and Type | Interface and Description |
---|---|
static interface |
Server.AuxiliaryServer
Auxiliary servers to be run in conjunction with a Server must implement this interface,
as well as provide a constructor with the following signature: (Server) for the associated server
|
static interface |
Server.ServerInfo
Encapsulates static server information
|
Modifier and Type | Field and Description |
---|---|
static PropertyValue<java.lang.String> |
AUXILIARY_SERVER_CLASS_NAMES
A comma separated list of auxiliary servers to run alongside this Server
Those must extend Server.AuxiliaryServer .Value type: String Default value: none |
static java.lang.String |
CLIENT_HOST_KEY
Specifies the client host connection parameter
|
static int |
DEFAULT_SERVER_CONNECTION_TIMEOUT |
static java.lang.String |
JAVAX_NET_KEYSTORE
The system property key for specifying a ssl keystore
|
static java.lang.String |
JAVAX_NET_KEYSTORE_PASSWORD
The system property key for specifying a ssl keystore password
|
static java.lang.String |
JAVAX_NET_TRUSTSTORE
The system property key for specifying a ssl truststore
|
static java.lang.String |
JAVAX_NET_TRUSTSTORE_PASSWORD
The system property key for specifying a ssl truststore password
|
static PropertyValue<java.lang.String> |
KEYSTORE
The rmi ssl keystore to use
Value type: String Default value: null |
static PropertyValue<java.lang.String> |
KEYSTORE_PASSWORD
The rmi ssl keystore password to use
Value type: String Default value: null |
static java.lang.String |
LOCALHOST
Localhost
|
static PropertyValue<java.lang.Integer> |
REGISTRY_PORT
The port on which to locate the server registry
Value type: Integer Default value: Registry.REGISTRY_PORT (1099) |
static PropertyValue<java.lang.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 |
static PropertyValue<java.lang.Integer> |
SERVER_ADMIN_PORT
The port on which the server should export the remote admin interface
Value type: Integer Default value: none |
static PropertyValue<java.lang.String> |
SERVER_ADMIN_USER
Specifies a username:password combination representing the server admin user
Example: scott:tiger |
static PropertyValue<java.lang.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 |
static PropertyValue<java.lang.Integer> |
SERVER_CONNECTION_TIMEOUT
Specifies a specific connection timeout for different client types
Value type: Integer
Default value: 120000ms (2 minutes) |
static PropertyValue<java.lang.String> |
SERVER_HOST_NAME
The host on which to locate the server
Value type: String Default value: localhost |
static PropertyValue<java.lang.String> |
SERVER_NAME_PREFIX
Specifies the prefix used when exporting/looking up the JMinor server
Value type: String Default value: JMinor Server |
static PropertyValue<java.lang.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: none |
static PropertyValue<java.lang.String> |
TRUSTSTORE
The rmi ssl truststore to use
Value type: String Default value: null |
static PropertyValue<java.lang.String> |
TRUSTSTORE_PASSWORD
The rmi ssl truststore password to use
Value type: String Default value: null |
Modifier and Type | Method and Description |
---|---|
T |
connect(ConnectionRequest connectionRequest)
Establishes a connection to this Server
|
boolean |
connectionsAvailable() |
void |
disconnect(java.util.UUID clientId)
Disconnects the connection identified by the given key.
|
A |
getServerAdmin(User user)
Returns the admin intarface used to administer this server
|
Server.ServerInfo |
getServerInfo() |
int |
getServerLoad() |
static final int DEFAULT_SERVER_CONNECTION_TIMEOUT
static final java.lang.String CLIENT_HOST_KEY
static final java.lang.String JAVAX_NET_KEYSTORE
static final java.lang.String JAVAX_NET_KEYSTORE_PASSWORD
static final java.lang.String JAVAX_NET_TRUSTSTORE
static final java.lang.String JAVAX_NET_TRUSTSTORE_PASSWORD
static final java.lang.String LOCALHOST
static final PropertyValue<java.lang.String> SERVER_HOST_NAME
static final PropertyValue<java.lang.String> RMI_SERVER_HOSTNAME
static final PropertyValue<java.lang.String> SERVER_NAME_PREFIX
static final PropertyValue<java.lang.Integer> SERVER_PORT
static final PropertyValue<java.lang.Integer> REGISTRY_PORT
static final PropertyValue<java.lang.String> KEYSTORE
static final PropertyValue<java.lang.String> KEYSTORE_PASSWORD
static final PropertyValue<java.lang.String> TRUSTSTORE
static final PropertyValue<java.lang.String> TRUSTSTORE_PASSWORD
static final PropertyValue<java.lang.Integer> SERVER_ADMIN_PORT
static final PropertyValue<java.lang.String> SERVER_ADMIN_USER
static final PropertyValue<java.lang.Boolean> SERVER_CONNECTION_SSL_ENABLED
static final PropertyValue<java.lang.Integer> SERVER_CONNECTION_TIMEOUT
static final PropertyValue<java.lang.String> AUXILIARY_SERVER_CLASS_NAMES
Server.AuxiliaryServer
.Server.AuxiliaryServer
T connect(ConnectionRequest connectionRequest) throws java.rmi.RemoteException, ServerException.ServerFullException, ServerException.LoginException, ServerException.ConnectionValidationException
connectionRequest
- the information required for establishing a connectionjava.rmi.RemoteException
- in case of a communitation errorServerException.ServerFullException
- in case the server isn't accepting more connectionsServerException.LoginException
- in case the login failsServerException.ConnectionValidationException
- in case connection validation failsA getServerAdmin(User user) throws java.rmi.RemoteException, ServerException.AuthenticationException
user
- the admin user credentialsjava.rmi.RemoteException
- in case of a communitation errorServerException.AuthenticationException
- in case authentication failsvoid disconnect(java.util.UUID clientId) throws java.rmi.RemoteException
clientId
- the UUID identifying the client that should be disconnectedjava.rmi.RemoteException
- in case of a communication errorServer.ServerInfo getServerInfo() throws java.rmi.RemoteException
java.rmi.RemoteException
- in case of an exceptionint getServerLoad() throws java.rmi.RemoteException
java.rmi.RemoteException
- in case of an exceptionboolean connectionsAvailable() throws java.rmi.RemoteException
java.rmi.RemoteException
- in case of an exception