|
db4o 8.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.db4o.cs.Db4oClientServer
public class Db4oClientServer
Factory class to open db4o servers and to connect db4o clients
to them.
Note:
This class is made available in db4o-X.x-cs-java.jar / Db4objects.Db4o.CS.dll
Field Summary | |
---|---|
static int |
ARBITRARY_PORT
|
Constructor Summary | |
---|---|
Db4oClientServer()
|
Method Summary | |
---|---|
static ClientConfiguration |
newClientConfiguration()
creates a new ClientConfiguration |
static ServerConfiguration |
newServerConfiguration()
creates a new ServerConfiguration |
static ObjectContainer |
openClient(ClientConfiguration config,
java.lang.String host,
int port,
java.lang.String user,
java.lang.String password)
opens a db4o client instance with the specified configuration. |
static ObjectContainer |
openClient(java.lang.String host,
int port,
java.lang.String user,
java.lang.String password)
opens a db4o client instance with a fresh client configuration. |
static ObjectServer |
openServer(ServerConfiguration config,
java.lang.String databaseFileName,
int port)
opens an ObjectServer
on the specified database file and port. |
static ObjectServer |
openServer(java.lang.String databaseFileName,
int port)
opens a db4o server with a fresh server configuration. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int ARBITRARY_PORT
Constructor Detail |
---|
public Db4oClientServer()
Method Detail |
---|
public static ServerConfiguration newServerConfiguration()
ServerConfiguration
public static ObjectServer openServer(ServerConfiguration config, java.lang.String databaseFileName, int port)
ObjectServer
on the specified database file and port.
config
- a custom ServerConfiguration
instance to be obtained via newServerConfiguration()
databaseFileName
- an absolute or relative path to the database fileport
- the port to be used or 0 if the server should not open a port, specify a value < 0 if an arbitrary free port should be chosen - see ExtObjectServer#port()
.
ObjectServer
listening
on the specified port.
Db4oIOException
- I/O operation failed or was unexpectedly interrupted.
DatabaseFileLockedException
- the required database file is locked by
another process.
IncompatibleFileFormatException
- runtime
configuration
is not compatible
with the configuration of the database file.
OldFormatException
- open operation failed because the database file
is in old format and Configuration.allowVersionUpdates(boolean)
is set to false.
DatabaseReadOnlyException
- database was configured as read-only.Configuration#readOnly
,
Configuration#encrypt
,
Configuration#password
public static ObjectServer openServer(java.lang.String databaseFileName, int port)
openServer(ServerConfiguration, String, int)
,
newServerConfiguration()
public static ObjectContainer openClient(ClientConfiguration config, java.lang.String host, int port, java.lang.String user, java.lang.String password)
config
- the configuration to be usedhost
- the host name of the server that is to be connected toport
- the server port to connect touser
- the username for authenticationpassword
- the password for authentication
java.lang.IllegalArgumentException
- if the configuration passed in has already been used.openServer(ServerConfiguration, String, int)
,
ObjectServer.grantAccess(String, String)
public static ObjectContainer openClient(java.lang.String host, int port, java.lang.String user, java.lang.String password)
openClient(ClientConfiguration, String, int, String, String)
,
newClientConfiguration()
public static ClientConfiguration newClientConfiguration()
ClientConfiguration
|
db4o 8.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |