Remap plugins class. More...
#include <RemapPlugins.h>
Inherits Continuation.
Public Member Functions | |
RemapPlugins () | |
RemapPlugins (HttpTransact::State *s, URL *u, HTTPHdr *h, host_hdr_info *hi) | |
~RemapPlugins () | |
void | setState (HttpTransact::State *state) |
void | setRequestUrl (URL *u) |
void | setRequestHeader (HTTPHdr *h) |
void | setHostHeaderInfo (host_hdr_info *h) |
int | run_remap (int event, Event *e) |
int | run_single_remap () |
This is the equivalent of the old DoRemap(). | |
TSRemapStatus | run_plugin (remap_plugin_info *plugin) |
Data Fields | |
Action | action |
Remap plugins class.
A class that represents a queue of plugins to run
Definition at line 43 of file RemapPlugins.h.
RemapPlugins::RemapPlugins | ( | ) | [inline] |
Definition at line 45 of file RemapPlugins.h.
RemapPlugins::RemapPlugins | ( | HttpTransact::State * | s, | |
URL * | u, | |||
HTTPHdr * | h, | |||
host_hdr_info * | hi | |||
) | [inline] |
Definition at line 49 of file RemapPlugins.h.
RemapPlugins::~RemapPlugins | ( | ) | [inline] |
Definition at line 53 of file RemapPlugins.h.
TSRemapStatus RemapPlugins::run_plugin | ( | remap_plugin_info * | plugin | ) |
Definition at line 29 of file RemapPlugins.cc.
References remap_plugin_info::fp_tsremap_do_remap, remap_plugin_info::fp_tsremap_os_response, HttpTransact::State::fp_tsremap_os_response, url_mapping::get_instance(), UrlMappingContainer::getFromURL(), UrlMappingContainer::getMapping(), UrlMappingContainer::getToURL(), URL::host_get(), HTTPHdr::m_http, URL::m_url_impl, map, _tm_remap_request_info::mapFromUrl, _tm_remap_request_info::mapToUrl, URL::path_get(), URL::port_get(), _tm_remap_request_info::redirect, HttpTransact::State::remap_plugin_instance, HttpTransact::State::remap_redirect, _tm_remap_request_info::requestBufp, _tm_remap_request_info::requestHdrp, _tm_remap_request_info::requestUrl, URL::scheme_get(), HttpTransact::State::state_machine, URL::string_get(), TSREMAP_DID_REMAP, TSREMAP_DID_REMAP_STOP, and HttpTransact::State::url_map.
Referenced by run_single_remap().
int RemapPlugins::run_remap | ( | int | event, | |
Event * | e | |||
) |
If ret !=0 then we are done with this processor and we call back into the SM; otherwise, we call this function again immediately (which really isn't immediate) thru the eventProcessor, thus forcing another run of run_single_remap() which will then operate on _request_url, etc performing additional remaps (mainly another plugin run)
Definition at line 153 of file RemapPlugins.cc.
References action, Action::cancelled, Ptr< T >::clear(), Action::continuation, Debug, EVENT_IMMEDIATE, EVENT_REMAP_COMPLETE, Continuation::handleEvent(), ink_assert, Action::mutex, Continuation::mutex, pluginAllocator, run_single_remap(), and Event::schedule_imm().
Referenced by RemapProcessor::perform_remap().
int RemapPlugins::run_single_remap | ( | ) |
This is the equivalent of the old DoRemap().
Definition at line 97 of file RemapPlugins.cc.
References url_mapping::_plugin_count, Debug, Error, url_mapping::get_plugin(), UrlMappingContainer::getMapping(), HttpTransact::State::hdr_info, HTTP_WKSIDX_CONNECT, map, url_mapping::map_id, MAX_REMAP_PLUGIN_CHAIN, HttpTransact::State::remap_redirect, run_plugin(), TSREMAP_DID_REMAP_STOP, TSREMAP_NO_REMAP, TSREMAP_NO_REMAP_STOP, HttpTransact::State::url_map, and url_rewrite_remap_request().
Referenced by RemapProcessor::perform_remap(), and run_remap().
void RemapPlugins::setHostHeaderInfo | ( | host_hdr_info * | h | ) | [inline] |
Definition at line 59 of file RemapPlugins.h.
Referenced by RemapProcessor::perform_remap().
void RemapPlugins::setRequestHeader | ( | HTTPHdr * | h | ) | [inline] |
Definition at line 58 of file RemapPlugins.h.
Referenced by RemapProcessor::perform_remap().
void RemapPlugins::setRequestUrl | ( | URL * | u | ) | [inline] |
Definition at line 57 of file RemapPlugins.h.
Referenced by RemapProcessor::perform_remap().
void RemapPlugins::setState | ( | HttpTransact::State * | state | ) | [inline] |
Definition at line 56 of file RemapPlugins.h.
Referenced by RemapProcessor::perform_remap().
Definition at line 65 of file RemapPlugins.h.
Referenced by RemapProcessor::perform_remap(), and run_remap().