StartServer Class

Summary

starts a db4o server with the settings from ServerInfo. This is a typical setup for a long running server. The Server may be stopped from a remote location by running StopServer. The StartServer instance is used as a MessageRecipient and reacts to receiving an instance of a StopServer object. Note that all user classes need to be present on the server side and that all possible Db4oFactory.Configure() calls to alter the db4o configuration need to be executed on the client and on the server.
Assembly
Db4odoc.Tutorial.Chapters-2010.dll
Namespace
Db4odoc.Tutorial.F1.Chapter6
Interfaces
  • IMessageRecipient
Base Types
graph BT Type-->Base0["ServerInfo"] click Base0 "/db4o-gpl-doc/output/api/Db4odoc.Tutorial.F1.Chapter6/ServerInfo" Base0-->Base1["Object"] Type-.->Interface0["IMessageRecipient"] Type["StartServer"] class Type type-node

Syntax

public class StartServer : ServerInfo, IMessageRecipient

Fields

Name Constant Value Summary
FILE formula1.yap
the database file to be used by the server.
Inherited from ServerInfo
static
HOST localhost
the host to be used. If you want to run the client server examples on two computers, enter the computer name of the one that you want to use as server.
Inherited from ServerInfo
static
PASS db4o
the pasword for access control.
Inherited from ServerInfo
static
PORT 4488
the port to be used by the server.
Inherited from ServerInfo
static
USER db4o
the user name for access control.
Inherited from ServerInfo
static

Methods

Name Value Summary
Close() void
closes this server.
Main(string[]) void
starts a db4o server using the configuration from ServerInfo.
static
ProcessMessage(IMessageContext, Object) void
messaging callback see com.db4o.messaging.MessageRecipient#ProcessMessage()
RunServer() void
opens the IObjectServer, and waits forever until Close() is called or a StopServer message is being received.