A class that represents the Kanzi Connect server. More...
#include <server.hpp>
Public Member Functions | |
| ConnectionManagerSharedPtr | getConnectionManager () |
| Gets the server's connection manager. More... | |
| ContentManagerSharedPtr | getContentManager () |
| Gets the server's content manager. More... | |
| DiagnosticsManagerSharedPtr | getDiagnosticsManager () |
| Gets the server's diagnostics manager. More... | |
| ConnectDomain * | getDomain () |
| Gets the server's domain. More... | |
| ServiceManagerSharedPtr | getServiceManager () |
| Gets the server's service manager. More... | |
| VirtualFileManagerSharedPtr | getVirtualFileManager () |
| Gets the server's HTTP virtual file manager. More... | |
| WorkQueueInterface * | getWorkQueueInterface () |
| Gets the interface that is used to access the work item queue. More... | |
| void | initialize (int threadcount=3, bool enableHttpServer=true) |
| Initializes the server. More... | |
| bool | isConfigured () |
| Determines whether the server has been configured properly. More... | |
| bool | processMessage () |
| Asks the server to perform work that was received while in idle loop. More... | |
| void | quit () |
| Quits message processing. More... | |
| Server (persistence::PersistenceFactoryInterface &persistenceFactory) | |
| Constructor. More... | |
| Server (const string configurationFilename, persistence::PersistenceFactoryInterface &persistenceFactory) | |
| Constructor. More... | |
| Server (FileSet &fileset, persistence::PersistenceFactoryInterface &persistenceFactory) | |
| Constructor. More... | |
| void | uninitialize () |
| Uninitializes the server. More... | |
| ~Server () | |
| Destructor. More... | |
A class that represents the Kanzi Connect server.
The server class can host multiple concurrent clients that have access to services registered to the server.
| kanzi::connect::Server::Server | ( | persistence::PersistenceFactoryInterface & | persistenceFactory | ) |
Constructor.
Constructs the absolute minimal server with just very few features enabled. The constructed server does not support HTTPS or SSL.
| persistenceFactory | Factory which is used to construct the backend of persistence service |
| kanzi::connect::Server::Server | ( | const string | configurationFilename, |
| persistence::PersistenceFactoryInterface & | persistenceFactory | ||
| ) |
Constructor.
| configurationFile | Full path to configuration file. |
| persistenceFactory | Factory which is used to construct the backend of persistence service |
| kanzi::connect::Server::Server | ( | FileSet & | fileset, |
| persistence::PersistenceFactoryInterface & | persistenceFactory | ||
| ) |
Constructor.
| fileset | List of configuration files passed during construction. |
| persistenceFactory | Factory which is used to construct the backend of persistence service |
| kanzi::connect::Server::~Server | ( | ) |
Destructor.
| ConnectionManagerSharedPtr kanzi::connect::Server::getConnectionManager | ( | ) |
Gets the server's connection manager.
| ContentManagerSharedPtr kanzi::connect::Server::getContentManager | ( | ) |
Gets the server's content manager.
| DiagnosticsManagerSharedPtr kanzi::connect::Server::getDiagnosticsManager | ( | ) |
Gets the server's diagnostics manager.
| ConnectDomain* kanzi::connect::Server::getDomain | ( | ) |
Gets the server's domain.
| ServiceManagerSharedPtr kanzi::connect::Server::getServiceManager | ( | ) |
Gets the server's service manager.
| VirtualFileManagerSharedPtr kanzi::connect::Server::getVirtualFileManager | ( | ) |
Gets the server's HTTP virtual file manager.
| WorkQueueInterface* kanzi::connect::Server::getWorkQueueInterface | ( | ) |
Gets the interface that is used to access the work item queue.
| void kanzi::connect::Server::initialize | ( | int | threadcount = 3, |
| bool | enableHttpServer = true |
||
| ) |
Initializes the server.
| threadcount | Number of worker threads to use to handle multithreaded services. A value of (numberOfCores - 1) usually provides the most efficient parallelism. The default number of worker threads is 3. |
| bool kanzi::connect::Server::isConfigured | ( | ) |
Determines whether the server has been configured properly.
| bool kanzi::connect::Server::processMessage | ( | ) |
Asks the server to perform work that was received while in idle loop.
| void kanzi::connect::Server::quit | ( | ) |
Quits message processing.
Causes processMessage() to return false.
| void kanzi::connect::Server::uninitialize | ( | ) |
Uninitializes the server.