Page Speed Optimization Libraries  1.6.29.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Static Public Member Functions | Friends
net_instaweb::ProxyFetchFactory Class Reference

#include "proxy_fetch.h"

List of all members.

Public Member Functions

 ProxyFetchFactory (ServerContext *server_context)
void StartNewProxyFetch (const GoogleString &url, AsyncFetch *async_fetch, RewriteDriver *driver, ProxyFetchPropertyCallbackCollector *property_callback, AsyncFetch *original_content_fetch)
ProxyFetchCreateNewProxyFetch (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, const bool requires_blink_cohort, bool *added_page_property_callback)

Friends

class ProxyFetch

Detailed Description

Factory for creating and starting ProxyFetches. Must outlive all ProxyFetches it creates.


Member Function Documentation

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 ProxyFetchPropertyCallbackCollector* net_instaweb::ProxyFetchFactory::InitiatePropertyCacheLookup ( bool  is_resource_fetch,
const GoogleUrl &  request_url,
ServerContext server_context,
RewriteOptions options,
AsyncFetch async_fetch,
const bool  requires_blink_cohort,
bool *  added_page_property_callback 
) [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.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines