xmltooling
3.3.0
|
Interface to generic protocol requests that transport XML messages. More...
#include <xmltooling/io/GenericRequest.h>
Public Member Functions | |
virtual const char * | getScheme () const =0 |
Returns the URL scheme of the request (http, https, ftp, ldap, etc.) More... | |
virtual bool | isSecure () const =0 |
Returns true iff the request is over a confidential channel. More... | |
virtual const char * | getHostname () const =0 |
Returns hostname of service that received request. More... | |
virtual int | getPort () const =0 |
Returns incoming port. More... | |
virtual bool | isDefaultPort () const |
Returns true iff the request port is the default port for the request protocol. More... | |
virtual std::string | getContentType () const =0 |
Returns the MIME type of the request, if known. More... | |
virtual long | getContentLength () const =0 |
Returns the length of the request body, if known. More... | |
virtual const char * | getRequestBody () const =0 |
Returns the raw request body. More... | |
virtual const char * | getParameter (const char *name) const =0 |
Returns a decoded named parameter value from the request. More... | |
virtual std::vector< const char * >::size_type | getParameters (const char *name, std::vector< const char *> &values) const =0 |
Returns all of the decoded values of a named parameter from the request. More... | |
virtual std::string | getRemoteUser () const =0 |
Returns the transport-authenticated identity associated with the request, if authentication is solely handled by the transport. More... | |
virtual std::string | getAuthType () const |
Gets the authentication type associated with the request. More... | |
virtual std::string | getRemoteAddr () const =0 |
Returns the IP address of the client. More... | |
virtual const std::vector< XSECCryptoX509 * > & | getClientCertificates () const =0 |
Returns the chain of certificates sent by the client. More... | |
virtual void | absolutize (std::string &url) const |
Converts a relative URL into an absolute one based on the properties of the request. More... | |
virtual std::string | getLanguageRange () const |
Returns a language range to use in selecting language-specific content for this request. More... | |
bool | startLangMatching () const |
Initializes the language matching process; call this method to begin the matching process by calling the matchLang method. More... | |
bool | continueLangMatching () const |
Continues the language matching process; additional calls to matchLang can be done as long as this method returns true. More... | |
bool | matchLang (const XMLCh *tag) const |
Matches a language tag against the currently active range. More... | |
Static Public Member Functions | |
static void | setLangDefaults (bool langFromClient, const XMLCh *defaultRange) |
Establish default handling of language ranges. More... | |
Interface to generic protocol requests that transport XML messages.
This interface need not be threadsafe.
|
virtual |
Converts a relative URL into an absolute one based on the properties of the request.
url | input URL to convert, will be modified in place |
bool xmltooling::GenericRequest::continueLangMatching | ( | ) | const |
Continues the language matching process; additional calls to matchLang can be done as long as this method returns true.
The language matching process is not thread-safe and must be externally syncronized.
|
inlinevirtual |
Gets the authentication type associated with the request.
|
pure virtual |
Returns the chain of certificates sent by the client.
They are not guaranteed to be valid according to any particular definition.
|
pure virtual |
Returns the length of the request body, if known.
|
pure virtual |
Returns the MIME type of the request, if known.
|
pure virtual |
Returns hostname of service that received request.
|
inlinevirtual |
Returns a language range to use in selecting language-specific content for this request.
The syntax is that of the HTTP 1.1 Accept-Language header, even if the underlying request is not HTTP.
Reimplemented in xmltooling::HTTPRequest.
|
pure virtual |
Returns a decoded named parameter value from the request.
If a parameter has multiple values, only one will be returned.
name | the name of the parameter to return |
|
pure virtual |
Returns all of the decoded values of a named parameter from the request.
All values found will be returned.
name | the name of the parameter to return |
values | a vector in which to return pointers to the decoded values |
|
pure virtual |
Returns incoming port.
|
pure virtual |
Returns the IP address of the client.
|
pure virtual |
Returns the transport-authenticated identity associated with the request, if authentication is solely handled by the transport.
|
pure virtual |
Returns the raw request body.
|
pure virtual |
Returns the URL scheme of the request (http, https, ftp, ldap, etc.)
|
virtual |
Returns true iff the request port is the default port for the request protocol.
Reimplemented in xmltooling::HTTPRequest.
|
pure virtual |
Returns true iff the request is over a confidential channel.
Implemented in xmltooling::HTTPRequest.
bool xmltooling::GenericRequest::matchLang | ( | const XMLCh * | tag | ) | const |
Matches a language tag against the currently active range.
The language matching process is not thread-safe and must be externally syncronized.
tag | a language tag (e.g., an xml:lang value) |
|
static |
Establish default handling of language ranges.
langFromClient | honor client's language preferences if any |
defaultRange | priority list of space-delimited language tags to use by default |
bool xmltooling::GenericRequest::startLangMatching | ( | ) | const |
Initializes the language matching process; call this method to begin the matching process by calling the matchLang method.
The language matching process is not thread-safe and must be externally syncronized.