bitz-server
2.0.0
|
Classes | |
struct | handler_t |
struct | req_handler_t |
Public Member Functions | |
RequestHandler (const std::string &method) | |
const std::string & | method () const throw () |
virtual icap::Response * | process (icap::RequestHeader *req_header, psocksxx::iosockstream *socket) throw () |
Protected Member Functions | |
bool | load_modifier (const std::string &file, Modifier::symbols_t &symbols) throw () |
void | unload_modifier (void *modifier) throw () |
void | load_modules () throw () |
void | cleanup_modules () throw () |
icap::Response * | process_preview (icap::Request *request, psocksxx::iosockstream *socket) throw () |
icap::Response * | process_modify (icap::Request *request) throw () |
bool | preview_continue (icap::Response *response, icap::Request *request, psocksxx::iosockstream *socket) throw () |
Protected Attributes | |
unsigned int | _handlers_count |
handler_t * | _handlers |
|
protected |
Cleanup all the loaded modifier modules
|
protected |
Load a modifier module
file | file name / path of the module |
symbols | structure to return the symbols |
|
protected |
Load all the configured modifier modules for this request handler
const std::string & bitz::RequestHandler::method | ( | ) | const | |
throw | ( | |||
) |
Returns the request method handled by this handler
|
protected |
Helper method to set a '100 Continue' response back to the client and read the full request.
response | response object with status 100 |
request | request object |
socket | socket object to read / write data |
|
virtual |
Process the request and return a new response object. This will also read from the passed in socket if more data needs to be read.
req_header | request header object |
socket | socket object to read the data from |
Reimplemented in bitz::OptionsRequestHandler.
|
protected |
This method will use the loaded handler modules to get a response to the request.
request | request object |
|
protected |
Given a request instance and a socket instance to communicate, this method will use the loaded handler modules to grab a preview response. This will return a icap::Response object or NULL after processing a '100 Continue' response.
request | request object |
socket | socket object to read data from |
|
protected |
Unload a modifier module
modifier | pointer to the modifier to unload |