class ServerCore


Module soprano
Namespace Soprano::Server
Class ServerCore
Inherits QObject,Soprano::Error::ErrorCache
\class ServerCore servercore.h Soprano/Server/ServerCore

Central %Soprano server class.

The %ServerCore provides a %Soprano server which maintains a set of named Model instances that can be accessed by clients over a tcp connection through Server.BackendPlugin.

Creating a server is very simple: Either derive from ServerCore or create an instance and then call start() to make the server listen for incoming connections.

Soprano.Server.ServerCore core;
core.start();

Optionally ServerCore can be configured using normal BackendSetting settings through setBackendSettings().

Be aware the ServerCode supports multiple ways of communication. start() opens a TCP socket to accept new connections, registerAsDBusObject() registers a DBus interface on the DBus session bus. Both ways of communication can be used simultaneously.

ServerCore is designed for single-threaded usage. Thus, model() uses Util.AsyncModel to protect against deadlocks. This behaviour can of course be changed by reimplementing model().

Author Sebastian Trueg



methods