MetriVis | Overview | Download | User Manual | Development |
Reference | Overview | Design Documentation | Reference Backend | Reference Frontend |
#include <RequestHandler.h>
Public Member Functions | |
RequestHandler (int number_of_threads) | |
Constructor. | |
virtual void | PushRequest (const RequestDescription &request_description) |
Handles request. | |
virtual void | Terminate () |
Stops the request handler, frees all it's resources. | |
Private Attributes | |
int | number_of_threads_ |
The number of simultanous threads. | |
ThreadPool< T > | thread_pool_ |
Local thread pool. | |
Data Structures | |
class | ThreadPool |
ThreadPool contains a set of worker threads. More... |
RequestHandler is used to handle a HTTP request. The handler gets a new request from the HTTPDriver. RequestHandler is templetized and gets the type of request as an template argument.
The second template argument (ID) is meant to separate different request handlers for debugging output.
metrivis::RequestHandler< T, ID >::RequestHandler | ( | int | number_of_threads | ) | [inline] |
Constructor.
number_of_threads,: | The number of threads to use for this type of request. |
virtual void metrivis::RequestHandler< T, ID >::PushRequest | ( | const RequestDescription & | request_description | ) | [inline, virtual] |
Handles request.
Copies the request object to local memory.
Reimplemented from metrivis::RequestHandlerBase.
virtual void metrivis::RequestHandler< T, ID >::Terminate | ( | ) | [inline, virtual] |
Stops the request handler, frees all it's resources.
Blocks until all jobs have finished and it's resources freed.
Reimplemented from metrivis::RequestHandlerBase.