restcgi::endpoint Class Reference

List of all members.

Detailed Description

Represents the HTTP service endpoint.

When a request is received from a client a method object is created to represent the request method and provide a mechanism for responding.

Note that the handler class hides some of the details of responding. The returned method can be passed to an application-defined root handler object to make it easier to find the resource identified by the URI and execute the method on it.

See also:
rest, method, resource, apply()


Public Types

typedef boost::shared_ptr<
endpoint
pointer
 shared ptr
typedef boost::shared_ptr<
const endpoint
const_pointer
 const shared ptr
typedef restcgi::env env_type
 env type
typedef boost::shared_ptr<
method
method_pointer
 method shared ptr

Public Member Functions

method_pointer receive ()
const env_typeenv () const
 Get environment.
void env_override (const std::string &name, const std::string &value)
 Override env.

Static Public Member Functions

static pointer create ()
 Create endpoint from std::cin and std::cout.
static pointer create (std::istream &is, std::ostream &os)
 Create endpoint.
static pointer create (const env_type &e, std::istream &is, std::ostream &os)
 For testing.

Friends

class method
class icontent
class ocontent


Member Function Documentation

method_pointer restcgi::endpoint::receive (  ) 

Receive method. Conceptually, this receives the method request header fields. Received content, if any, can be streamed after this call. Response header and content can be sent using the returned method object.

See also:
method_e
Exceptions:
std::domain_error if method type unknown (response automatically sent)


Generated on Fri May 15 11:27:12 2009 for restcgi by  doxygen 1.4.7