Page Speed Optimization Libraries
1.13.35.1
|
#include "proxy_fetch.h"
Public Member Functions | |
ProxyFetchFactory (ServerContext *server_context) | |
void | StartNewProxyFetch (const GoogleString &url, AsyncFetch *async_fetch, RewriteDriver *driver, ProxyFetchPropertyCallbackCollector *property_callback, AsyncFetch *original_content_fetch) |
ProxyFetch * | CreateNewProxyFetch (const GoogleString &url, AsyncFetch *async_fetch, RewriteDriver *driver, ProxyFetchPropertyCallbackCollector *property_callback, AsyncFetch *original_content_fetch) |
MessageHandler * | message_handler () const |
Static Public Member Functions | |
static ProxyFetchPropertyCallbackCollector * | InitiatePropertyCacheLookup (bool is_resource_fetch, const GoogleUrl &request_url, ServerContext *server_context, RewriteOptions *options, AsyncFetch *async_fetch) |
Friends | |
class | ProxyFetch |
Factory for creating and starting ProxyFetches. Must outlive all ProxyFetches it creates.
ProxyFetch* net_instaweb::ProxyFetchFactory::CreateNewProxyFetch | ( | const GoogleString & | url, |
AsyncFetch * | async_fetch, | ||
RewriteDriver * | driver, | ||
ProxyFetchPropertyCallbackCollector * | property_callback, | ||
AsyncFetch * | original_content_fetch | ||
) |
Creates a new proxy fetch and passes it to the fetcher to start it. If the UrlNamer doesn't authorize this url it calls CleanUp() on the driver, Detach() on the property callback, Done() on the async_fetch and original_content_fetch, and returns NULL.
If you're using a fetcher for the original request content you should use StartNewProxyFetch() instead. CreateNewProxyFetch is for callers who will not be calling StartFetch() and instead will call HeadersComplete(), Write(), Flush(), and Done() as they get data in from another source.
|
static |
Initiates the PropertyCache lookup. See ngx_pagespeed.cc or proxy_interface.cc for example usage.
void net_instaweb::ProxyFetchFactory::StartNewProxyFetch | ( | const GoogleString & | url, |
AsyncFetch * | async_fetch, | ||
RewriteDriver * | driver, | ||
ProxyFetchPropertyCallbackCollector * | property_callback, | ||
AsyncFetch * | original_content_fetch | ||
) |
Convenience method that calls CreateNewProxyFetch and then StartFetch() on the resulting fetch.