Wexus2 0.20
wexus::Site Class Reference

#include <Site.h>

Inheritance diagram for wexus::Site:

List of all members.

Classes

class  error

Public Member Functions

 Site (const QString &siteDir, const wexus::HTTPParams &params=wexus::HTTPParams())
 ~Site ()
 destructor
bool isRunning (void) const
 is the web server currently running?
void start (void)
 starts the web server
void quit (void)
void wait (void)
 waits until the server finishes
void addApplication (const QString &mountpoint, std::shared_ptr< wexus::Application > app)

Detailed Description

This is the core engine class of wexus. A wexus::Site represents 1 or more running wexus::Application instanced groupped with a wexus::HTTPServer.

This will instante certain singltons too, if needed: MimeTypes.

Author:
Aleksander Demko

Constructor & Destructor Documentation

wexus::Site::Site ( const QString &  siteDir,
const wexus::HTTPParams params = wexus::HTTPParams() 
)

Creates site instance based on the given siteDir. The siteDir can be empty or already populated with a site.

Exceptions are thrown on errors.

You should call start() when you want to start the internal httpserver.

Author:
Aleksander Demko

Member Function Documentation

void wexus::Site::addApplication ( const QString &  mountpoint,
std::shared_ptr< wexus::Application app 
)

Adds an already instantiated application to the given mount point. The mountpoint must end in a '/'. The root mountpoint, "/" is fine too.

Author:
Aleksander Demko
void wexus::Site::quit ( void  )

notifies the web server to stop. you should still do a wait() this function may or may not block


The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables Enumerations Enumerator