abstract class that all HTTP dedicated socket handler objects must inherit from
More...
|
| constructor (*AbstractAuthenticator auth) |
| create the object optionally with the given AbstractAuthenticator More...
|
|
abstract hash | handleRequest (hash cx, hash hdr, *data b) |
| called by the HTTP server to handle incoming HTTP requests More...
|
|
| start (softstring lid, hash cx, hash hdr, Socket s) |
| called from the HTTP server after the handleRequest() method indicates that a dedicated connection should be established More...
|
|
abstract private | startImpl (softstring lid, hash cx, hash hdr, Socket s) |
| called from the HTTP server after the handleRequest() method indicates that a dedicated connection should be established More...
|
|
| stop (softstring lid) |
| called from the HTTP server when the socket should be closed due to an HTTP listener being stopped; the start() method for all connections on the particular listener should return as soon as possible after this method is called More...
|
|
| stop () |
| called from the HTTP server when the socket should be closed due to an external request; the start() method should return as soon as possible after this method is called More...
|
|
private | stopImpl (string lid) |
| called from the HTTP server when the socket should be closed because the listener is stopping; the start() method for all connections handled by the given listener should return as soon as possible after this method is called More...
|
|
private | stopImpl () |
| called from the HTTP server when the socket should be closed due to an external request; the start() method should return as soon as possible after this method is called
|
|
Public Member Functions inherited from HttpServer::AbstractHttpRequestHandler |
private nothing | checkPersistent (hash cx, hash hdr) |
| this method will throw an exception if a persistent connection cannot be granted
|
|
| constructor (*AbstractAuthenticator auth, softbool stream=False) |
| create the object optionally with the given AbstractAuthenticator More...
|
|
*data | getMessageBody (Socket s, hash hdr, *data body, bool decode=True) |
| optionally retrieves and post-processes any message body
|
|
private AbstractStreamRequest | getStreamRequestImpl (HttpListener listener, Socket s, hash cx, hash hdr, *data body) |
| returns the AbstractStreamRequest object for handling chunked requests
|
|
hash | handleRequest (hash cx, hash hdr, *data body) |
| will be called when a request is received that should be directed to the handler More...
|
|
hash | handleRequest (HttpListener listener, Socket s, hash cx, hash hdr, *data body) |
| top-level request handling method
|
|
nothing | persistentClosed () |
| called externally when a persistent connection is closed
|
|
| restoreThreadLocalData (*hash data) |
| called after handleRequest() with any data returned from saveThreadData() More...
|
|
*hash | saveThreadLocalData () |
| called before handleRequest() any data returned here will be given to restoreThreadLocalData() after the handleRequest() call More...
|
|
|
Static Public Member Functions inherited from HttpServer::AbstractHttpRequestHandler |
static data | decodeBody (string ce, binary body, *string enc) |
| decodes a message body with content-encoding
|
|
static binary | encodeBody (string ce, data body) |
| encodes a message body with content-encoding
|
|
static *string | getLogMessage (hash cx, hash api, reference params, *reference args) |
| helper method for handling log messages More...
|
|
static hash | make400 (string fmt) |
| creates a hash for an HTTP 400 error response with the response message body as a string
|
|
static hash | make400 (hash hdr, string fmt) |
| creates a hash for an HTTP 400 error response with the response message body as a string
|
|
static hash | make501 (string fmt) |
| creates a hash for an HTTP 501 error response with the response message body as a string
|
|
static hash | make501 (hash hdr, string fmt) |
| creates a hash for an HTTP 501 error response with the response message body as a string
|
|
static hash | makeResponse (int code, string fmt) |
| creates a hash for an HTTP response with the response code and the response message body as a formatted string
|
|
static hash | makeResponse (hash hdr, int code, string fmt) |
| creates a hash for an HTTP response with the response code and the response message body as a formatted string
|
|
static hash | makeResponse (int code, *data body, *hash hdr) |
| creates a hash for an HTTP response with the response code and a literal response message body
|
|
static hash | redirect (hash cx, hash hdr, string path) |
| generates a redirect hash for the given path
|
|
Public Attributes inherited from HttpServer::AbstractHttpRequestHandler |
*AbstractAuthenticator | auth |
| the optional AbstractAuthenticator for requests to this handler
|
|
bool | decompress = True |
| if POSTed data should be decompressed automatically if there is content-encoding
|
|
bool | decompress_to_string = True |
| if automatically decompressed POSTed data should be converted to a string (if False, then it will be decompressed to a binary)
|
|
bool | persistent |
| persistent connection flag
|
|
bool | stream |
| if the handler supports streaming requests/responses with chunked data
|
|
abstract class that all HTTP dedicated socket handler objects must inherit from
reimplement at least handleRequest() and startImpl() in subclasses