#include <service.h>

Public Member Functions | |
| Renderer (caller_type &caller, const RendererInitializer &initializer) SSRC_DECL_THROW(LoadError | |
| virtual | ~Renderer () |
| virtual void | http_get (const request_ptr &request, response_ptr &response) |
| virtual void | http_head (const request_ptr &request, response_ptr &response) |
| void | process_fcgi_request (const fcgx_request_ptr &request) |
Protected Types | |
| typedef HTTPServlet < FCGIRequest, FCGIResponse > | super_fcgi |
| typedef ServiceProtocolProcessor | super_service |
Protected Member Functions | |
| WISP_IMPORT (protocol_traits, MessageReloadConfig) | |
| virtual void | transition (State state) |
| virtual utility::properties_ptr | get_status () |
| virtual void | set_lua_state (Lua::lua_State *state) |
| void | render_and_cache (const request_ptr &request, response_ptr &response, const bool flush=true) |
| path | find_error_template (const path &error_template, const path &parent_path) |
| path | find_error_template (const path &parent_path) |
| path | find_error_template (const path &parent_path, int index) |
| void | send_error (const HTTPStatusCode status, const request_ptr &request, response_ptr &response, const path &error_template) |
| void | load_environment (const string &environment_name, const bool cache_template) SSRC_DECL_THROW(LuaCallError) |
| void | uncache_template (const string &template_name) SSRC_DECL_THROW(LuaCallError) |
| void | uncache_environment (const string &environment_name) SSRC_DECL_THROW(LuaCallError) |
| void | clear_template_cache () |
| path | load_template_args (const path &template_path, const char *template_key, const bool cache_environment=false, const bool cache_template=true) SSRC_DECL_THROW(LoadError) |
| path | load_template_args (const path &template_path, const bool cache_environment=false, const bool cache_template=true) SSRC_DECL_THROW(LoadError) |
| virtual void | process_request (const MessageReloadConfig &msg, const MessageInfo &) |
Protected Attributes | |
| string | _global_env_file |
| string | _template_prefix |
| path | _template_dir |
| boost::regex | _get_path_pattern |
| Lua::lua_State * | _lua_state |
| int | _lua_render_ref |
| int | _lua_load_environment_ref |
| int | _lua_uncache_template_ref |
| int | _lua_uncache_environment_ref |
| int | _lua_clear_rendering_cache_ref |
| int | _lua_init_global_environment_ref |
Friends | |
| class | NS_SSRC_WISP_SERVICE::ServiceProtocolProcessor< packing_traits > |
Detailed Description
Definition at line 71 of file renderer/service.h.
Member Typedef Documentation
typedef HTTPServlet<FCGIRequest, FCGIResponse> renderer::Renderer::super_fcgi [protected] |
Definition at line 85 of file renderer/service.h.
typedef ServiceProtocolProcessor renderer::Renderer::super_service [protected] |
Definition at line 86 of file renderer/service.h.
Constructor & Destructor Documentation
| renderer::Renderer::Renderer | ( | caller_type & | caller, |
| const RendererInitializer & | initializer | ||
| ) |
| renderer::Renderer::~Renderer | ( | ) | [virtual] |
Definition at line 79 of file renderer/service.cc.
References renderer::_lua_state().
Member Function Documentation
| void renderer::Renderer::clear_template_cache | ( | ) | [protected] |
Definition at line 112 of file renderer/service.cc.
References renderer::_lua_clear_rendering_cache_ref(), renderer::_lua_state(), and lua::pcall().
| path renderer::Renderer::find_error_template | ( | const path & | error_template, |
| const path & | parent_path | ||
| ) | [protected] |
Definition at line 308 of file renderer/service.cc.
References renderer::_template_dir(), and renderer::_template_prefix().
| path renderer::Renderer::find_error_template | ( | const path & | parent_path | ) | [inline, protected] |
Definition at line 117 of file renderer/service.h.
References renderer::_lua_state().
| path renderer::Renderer::find_error_template | ( | const path & | parent_path, |
| int | index | ||
| ) | [inline, protected] |
Definition at line 121 of file renderer/service.h.
References renderer::_lua_state().
| utility::properties_ptr renderer::Renderer::get_status | ( | ) | [protected, virtual] |
Definition at line 102 of file renderer/service.cc.
References renderer::_lua_state(), utility::PropTree< Key, Ops, TreeType >::create_node(), and utility::Properties::set().
| virtual void renderer::Renderer::http_get | ( | const request_ptr & | request, |
| response_ptr & | response | ||
| ) | [inline, virtual] |
Reimplemented in relay::Relay.
Definition at line 185 of file renderer/service.h.
| virtual void renderer::Renderer::http_head | ( | const request_ptr & | request, |
| response_ptr & | response | ||
| ) | [inline, virtual] |
Definition at line 189 of file renderer/service.h.
| void renderer::Renderer::load_environment | ( | const string & | environment_name, |
| const bool | cache_template | ||
| ) | [inline, protected] |
Definition at line 130 of file renderer/service.h.
References renderer::_lua_load_environment_ref(), renderer::_lua_state(), and lua::pcall_nopop().
| path renderer::Renderer::load_template_args | ( | const path & | template_path, |
| const char * | template_key, | ||
| const bool | cache_environment = false, |
||
| const bool | cache_template = true |
||
| ) | [protected] |
| path renderer::Renderer::load_template_args | ( | const path & | template_path, |
| const bool | cache_environment = false, |
||
| const bool | cache_template = true |
||
| ) | [inline, protected] |
Definition at line 162 of file renderer/service.h.
| void renderer::Renderer::process_fcgi_request | ( | const fcgx_request_ptr & | request | ) |
Definition at line 216 of file renderer/service.cc.
References fcgi::MethodMax, NS_SSRC_WSPR_FCGI, fcgi::StatusInternalServerError, and fcgi::StatusMethodNotImplemented.
| virtual void renderer::Renderer::process_request | ( | const MessageReloadConfig & | msg, |
| const MessageInfo & | |||
| ) | [inline, protected, virtual] |
Definition at line 172 of file renderer/service.h.
| void renderer::Renderer::render_and_cache | ( | const request_ptr & | request, |
| response_ptr & | response, | ||
| const bool | flush = true |
||
| ) | [protected] |
Definition at line 386 of file renderer/service.cc.
References renderer::_get_path_pattern(), renderer::_lua_init_global_environment_ref(), renderer::_lua_render_ref(), renderer::_lua_state(), renderer::_template_dir(), renderer::cache_to_file(), renderer::ltp_file(), NS_SSRC_WSPR_FCGI, lua::pcall(), lua::pcall_nopop(), lua::set_value(), fcgi::StatusInternalServerError, fcgi::StatusNotFound, and fcgi::StatusOK.
| void renderer::Renderer::send_error | ( | const HTTPStatusCode | status, |
| const request_ptr & | request, | ||
| response_ptr & | response, | ||
| const path & | error_template | ||
| ) | [protected] |
Definition at line 335 of file renderer/service.cc.
References renderer::_lua_render_ref(), renderer::_lua_state(), fcgi::CacheDisable, NS_SSRC_WSPR_FCGI, lua::pcall_nopop(), and fcgi::StatusInternalServerError.
| virtual void renderer::Renderer::set_lua_state | ( | Lua::lua_State * | state | ) | [inline, protected, virtual] |
Reimplemented in relay::Relay.
Definition at line 107 of file renderer/service.h.
References renderer::_lua_state().
| void renderer::Renderer::transition | ( | State | state | ) | [protected, virtual] |
Definition at line 87 of file renderer/service.cc.
| void renderer::Renderer::uncache_environment | ( | const string & | environment_name | ) | [inline, protected] |
Definition at line 146 of file renderer/service.h.
References renderer::_lua_state(), renderer::_lua_uncache_environment_ref(), and lua::pcall().
| void renderer::Renderer::uncache_template | ( | const string & | template_name | ) | [inline, protected] |
Definition at line 139 of file renderer/service.h.
References renderer::_lua_state(), renderer::_lua_uncache_template_ref(), and lua::pcall().
| renderer::Renderer::WISP_IMPORT | ( | protocol_traits | , |
| MessageReloadConfig | |||
| ) | [protected] |
Friends And Related Function Documentation
friend class NS_SSRC_WISP_SERVICE::ServiceProtocolProcessor< packing_traits > [friend] |
Reimplemented in relay::Relay.
Definition at line 75 of file renderer/service.h.
Member Data Documentation
boost::regex renderer::Renderer::_get_path_pattern [protected] |
Definition at line 93 of file renderer/service.h.
string renderer::Renderer::_global_env_file [protected] |
Definition at line 90 of file renderer/service.h.
int renderer::Renderer::_lua_clear_rendering_cache_ref [protected] |
Definition at line 100 of file renderer/service.h.
int renderer::Renderer::_lua_init_global_environment_ref [protected] |
Definition at line 101 of file renderer/service.h.
int renderer::Renderer::_lua_load_environment_ref [protected] |
Definition at line 97 of file renderer/service.h.
int renderer::Renderer::_lua_render_ref [protected] |
Definition at line 96 of file renderer/service.h.
Lua::lua_State* renderer::Renderer::_lua_state [protected] |
Definition at line 95 of file renderer/service.h.
int renderer::Renderer::_lua_uncache_environment_ref [protected] |
Definition at line 99 of file renderer/service.h.
int renderer::Renderer::_lua_uncache_template_ref [protected] |
Definition at line 98 of file renderer/service.h.
path renderer::Renderer::_template_dir [protected] |
Definition at line 92 of file renderer/service.h.
string renderer::Renderer::_template_prefix [protected] |
Definition at line 91 of file renderer/service.h.
The documentation for this class was generated from the following files: