public class DbServer extends Object
ClientSocketFactory,
ServerSocketFactorySslClientSocketFactory,
SslServerSocketFactoryCompressedClientSocketFactory,
CompressedServerSocketFactoryCompressedSslClientSocketFactory and
CompressedSslServerSocketFactory.
For SSL only:
| Modifier and Type | Field and Description |
|---|---|
static String |
CIPHER_SUITES
The property key for the SSL cipher suites.
|
static String |
CLIENT_AUTH
The property key for the SSL client authentication.
|
static String |
CONNECTION_CLASS
The property key for the connection class to export.
|
static String |
CREATE_REGISTRY
The property key whether to create a registry or use an external one.
|
static String |
PORT
The property key for the single RMI port.
|
static String |
PORTS
The property key for the RMI ports.
|
static String |
PROTOCOLS
The property key for the SSL protocols.
|
static String |
RMI_SERVICE
The property key for the RMI service name.
|
static String |
TIMEOUT
The property key for the session timeout count.
|
static String |
TIMEOUT_INTERVAL
The property key for the session timeout interval units in milliseconds.
|
| Constructor and Description |
|---|
DbServer(SessionInfo serverInfo)
Creates an instance of an RMI-db-server with default connection object
(or configured entirely by db properties file)
|
DbServer(SessionInfo sessionInfo,
Class<? extends RemoteDbConnectionImpl> connectionClass)
Creates an instance of an RMI-db-server.
|
| Modifier and Type | Method and Description |
|---|---|
RMIClientSocketFactory |
getClientSocketFactory()
Gets the server's csf
|
int |
getCompressedPort()
Get the fixed port for compressed communication
|
int |
getCompressedSslPort()
Get the fixed port for compressed+ssl communication
|
RMIClientSocketFactory |
getLoginClientSocketFactory()
Gets the server's csf for the login phase.
|
RMIServerSocketFactory |
getLoginServerSocketFactory()
Gets the server's ssf for the login phase.
|
int |
getPlainPort()
Get the fixed port for plain communication.
|
int |
getPort()
Gets the port the server is listening on
|
int |
getPort(int requestedPort,
SocketFactoryType factoryType)
Gets the rmi port for a new remote object.
|
Registry |
getRegistry()
Gets the local registry.
|
RMIServerSocketFactory |
getServerSocketFactory()
Gets the server's ssf
|
SessionInfo |
getSessionInfo()
Gets the server's user info.
|
int |
getSessionTimeout()
Gets the default session timeout.
|
long |
getSessionTimeoutCheckInterval()
Gets the timeout check interval in milliseconds.
|
int |
getSslPort()
Get the fixed port for ssl communication
|
void |
start()
Starts the server.
|
void |
stop()
Stops the server.
|
public static final String CONNECTION_CLASS
public static final String RMI_SERVICE
public static final String CREATE_REGISTRY
public static final String TIMEOUT
public static final String TIMEOUT_INTERVAL
public static final String PORTS
public static final String PORT
public static final String CIPHER_SUITES
public static final String PROTOCOLS
public static final String CLIENT_AUTH
public DbServer(SessionInfo sessionInfo, Class<? extends RemoteDbConnectionImpl> connectionClass) throws ApplicationException
sessionInfo - the servers db-connection user infoconnectionClass - the class of the connection object to instantiate, null = default or from serverInfo's properties fileApplicationException - if some configuration errorpublic DbServer(SessionInfo serverInfo) throws ApplicationException
serverInfo - the servers db-connection user infoApplicationException - if some configuration errorpublic SessionInfo getSessionInfo()
public int getPort(int requestedPort,
SocketFactoryType factoryType)
throws ApplicationException
requestedPort - the requested port by the delegate, 0 = use system defaultfactoryType - the socket factory typeApplicationException - if requested port could not be grantedpublic int getPlainPort()
public int getCompressedPort()
public int getSslPort()
public int getCompressedSslPort()
public int getPort()
public RMIClientSocketFactory getClientSocketFactory()
public RMIServerSocketFactory getServerSocketFactory()
public RMIClientSocketFactory getLoginClientSocketFactory()
public RMIServerSocketFactory getLoginServerSocketFactory()
public int getSessionTimeout()
getSessionTimeoutCheckInterval()public long getSessionTimeoutCheckInterval()
getSessionTimeout()public void start()
throws ApplicationException
ApplicationException - if startup failedpublic Registry getRegistry()
public void stop()
throws ApplicationException
Unbinds the connection object.
ApplicationExceptionCopyright © 2016 Krake Softwaretechnik. All rights reserved.