Kanzi Connect  1.1.10
Kanzi Connect C++ API
kanzi::connect::Server Class Reference

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...
 
ConnectDomaingetDomain ()
 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...
 
WorkQueueInterfacegetWorkQueueInterface ()
 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...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ Server() [1/3]

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.

Parameters
persistenceFactoryFactory which is used to construct the backend of persistence service

◆ Server() [2/3]

kanzi::connect::Server::Server ( const string  configurationFilename,
persistence::PersistenceFactoryInterface &  persistenceFactory 
)

Constructor.

Parameters
configurationFileFull path to configuration file.
persistenceFactoryFactory which is used to construct the backend of persistence service

◆ Server() [3/3]

kanzi::connect::Server::Server ( FileSet fileset,
persistence::PersistenceFactoryInterface &  persistenceFactory 
)

Constructor.

Parameters
filesetList of configuration files passed during construction.
persistenceFactoryFactory which is used to construct the backend of persistence service

◆ ~Server()

kanzi::connect::Server::~Server ( )

Destructor.

Member Function Documentation

◆ getConnectionManager()

ConnectionManagerSharedPtr kanzi::connect::Server::getConnectionManager ( )

Gets the server's connection manager.

Returns
Connection manager instance.

◆ getContentManager()

ContentManagerSharedPtr kanzi::connect::Server::getContentManager ( )

Gets the server's content manager.

Returns
Content manager instance.

◆ getDiagnosticsManager()

DiagnosticsManagerSharedPtr kanzi::connect::Server::getDiagnosticsManager ( )

Gets the server's diagnostics manager.

Returns
Diagnostics manager instance.

◆ getDomain()

ConnectDomain* kanzi::connect::Server::getDomain ( )

Gets the server's domain.

Returns
Pointer to the domain. Ownership of the pointer is not transferred.

◆ getServiceManager()

ServiceManagerSharedPtr kanzi::connect::Server::getServiceManager ( )

Gets the server's service manager.

Returns
Service manager instance.

◆ getVirtualFileManager()

VirtualFileManagerSharedPtr kanzi::connect::Server::getVirtualFileManager ( )

Gets the server's HTTP virtual file manager.

Returns
Virtual file manager instance.

◆ getWorkQueueInterface()

WorkQueueInterface* kanzi::connect::Server::getWorkQueueInterface ( )

Gets the interface that is used to access the work item queue.

Returns
Pointer to the interface. Ownership of the pointer is not transferred.

◆ initialize()

void kanzi::connect::Server::initialize ( int  threadcount = 3,
bool  enableHttpServer = true 
)

Initializes the server.

Parameters
threadcountNumber 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.

◆ isConfigured()

bool kanzi::connect::Server::isConfigured ( )

Determines whether the server has been configured properly.

Returns
Indicates whether the server has been configured properly.

◆ processMessage()

bool kanzi::connect::Server::processMessage ( )

Asks the server to perform work that was received while in idle loop.

Returns
Indicates whether message processing continues.

◆ quit()

void kanzi::connect::Server::quit ( )

Quits message processing.

Causes processMessage() to return false.

◆ uninitialize()

void kanzi::connect::Server::uninitialize ( )

Uninitializes the server.


The documentation for this class was generated from the following file: