For now, we don't register and unregister apps. More...
#include <service.h>
Classes | |
struct | FinishPostContext |
Public Types | |
typedef boost::shared_ptr < ActionConfig > | action_config_ptr |
Public Member Functions | |
Relay (caller_type &caller, const RelayInitializer &initializer) SSRC_DECL_THROW(LoadError | |
virtual | ~Relay () |
virtual void | http_post (const request_ptr &request, response_ptr &response) |
virtual void | http_get (const request_ptr &request, response_ptr &response) |
In order to support the use of GET to retrieve content that would otherwise be generated by a POST, we check to see if any parameters were specified. | |
void | continue_post (FinishPostContext &context, const MessageSingleQueryResult &session_result) |
void | finish_post (FinishPostContext &context, const MessageResponse &result) |
Protected Member Functions | |
virtual void | set_lua_state (Lua::lua_State *state) |
Friends | |
class | NS_SSRC_WISP_SERVICE::ServiceProtocolProcessor< packing_traits > |
Detailed Description
For now, we don't register and unregister apps.
Instead, we look for and load a service config file in the service config directory.
Definition at line 56 of file relay/service.h.
Member Typedef Documentation
typedef boost::shared_ptr<ActionConfig> Relay::action_config_ptr |
Definition at line 60 of file relay/service.h.
Constructor & Destructor Documentation
Relay::Relay | ( | caller_type & | caller, |
const RelayInitializer & | initializer | ||
) |
virtual Relay::~Relay | ( | ) | [inline, virtual] |
Definition at line 131 of file relay/service.h.
Member Function Documentation
void Relay::continue_post | ( | FinishPostContext & | context, |
const MessageSingleQueryResult & | session_result | ||
) |
Definition at line 281 of file relay/service.cc.
References Relay::FinishPostContext::action, finish_post(), MethodGet, NS_SSRC_WSPR_FCGI, Relay::FinishPostContext::parameters, Relay::FinishPostContext::parent_path, Relay::FinishPostContext::request, Relay::FinishPostContext::request_method, Relay::FinishPostContext::response, StatusBadRequest, StatusForbidden, and StatusOK.
void Relay::finish_post | ( | FinishPostContext & | context, |
const MessageResponse & | result | ||
) |
Definition at line 362 of file relay/service.cc.
References _lua_init_global_environment_ref(), _lua_render_ref(), _lua_state(), _template_dir(), _template_prefix(), _to_table(), Relay::FinishPostContext::action, ltp_file(), NS_SSRC_WSPR_FCGI, Relay::FinishPostContext::parent_path, pcall(), pcall_nopop(), properties_to_table(), push_value(), Relay::FinishPostContext::request, Relay::FinishPostContext::response, set_value(), StatusForbidden, StatusInternalServerError, StatusNotFound, and StatusOK.
Referenced by continue_post().
virtual void Relay::http_get | ( | const request_ptr & | request, |
response_ptr & | response | ||
) | [inline, virtual] |
In order to support the use of GET to retrieve content that would otherwise be generated by a POST, we check to see if any parameters were specified.
If not, we execute Renderer::http_get, else we execute Renderer::http_post. That means you must supply a dummy argument for no-arg POSTs, except that right now we require an action parameter, so the minimum requirement would be to specify an action. Inside of http_post we check if the request method is GET and if so we require permits_get to be true in the ActionConfig.
Definition at line 150 of file relay/service.h.
References parameter_map, and parse_get_parameters().
virtual void Relay::http_post | ( | const request_ptr & | request, |
response_ptr & | response | ||
) | [inline, virtual] |
Definition at line 133 of file relay/service.h.
References parameter_map, and parse_post_parameters().
virtual void Relay::set_lua_state | ( | Lua::lua_State * | state | ) | [inline, protected, virtual] |
Definition at line 101 of file relay/service.h.
References _to_table().
Friends And Related Function Documentation
friend class NS_SSRC_WISP_SERVICE::ServiceProtocolProcessor< packing_traits > [friend] |
Definition at line 57 of file relay/service.h.
The documentation for this class was generated from the following files: