Page Speed Optimization Libraries  1.13.35.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Member Functions | List of all members
net_instaweb::NotifyingFetch Class Reference

#include "notifying_fetch.h"

Inheritance diagram for net_instaweb::NotifyingFetch:
net_instaweb::AsyncFetch net_instaweb::Writer

Public Member Functions

 NotifyingFetch (const RequestContextPtr &request_context, RewriteOptions *options, const GoogleString &url, WorkerTestBase::SyncPoint *sync, ResponseHeaders *response_headers)
 
StringPiece content ()
 
bool done ()
 
bool success ()
 
- Public Member Functions inherited from net_instaweb::AsyncFetch
 AsyncFetch (const RequestContextPtr &request_ctx)
 
void HeadersComplete ()
 
void Done (bool success)
 
virtual bool Write (const StringPiece &content, MessageHandler *handler)
 
virtual bool Flush (MessageHandler *handler)
 
RequestHeadersrequest_headers ()
 
void set_request_headers (RequestHeaders *headers)
 
void SetRequestHeadersTakingOwnership (RequestHeaders *headers)
 Same as above, but takes ownership.
 
const RequestHeadersrequest_headers () const
 
ResponseHeadersresponse_headers ()
 See doc for request_headers and set_request_headers.
 
void set_response_headers (ResponseHeaders *headers)
 
ResponseHeadersextra_response_headers ()
 
void set_extra_response_headers (ResponseHeaders *headers)
 
virtual bool IsBackgroundFetch () const
 
virtual void Reset ()
 
bool headers_complete () const
 
bool content_length_known () const
 
int64 content_length () const
 
void set_content_length (int64 x)
 
GoogleString LoggingString ()
 
virtual const RequestContextPtrrequest_context ()
 
virtual AbstractLogRecordlog_record ()
 
void FixCacheControlForGoogleCache ()
 
- Public Member Functions inherited from net_instaweb::Writer
virtual bool Dump (Writer *writer, MessageHandler *message_handler)
 

Protected Member Functions

void HandleHeadersComplete () override
 
bool HandleWrite (const StringPiece &content, MessageHandler *handler) override
 
bool HandleFlush (MessageHandler *handler) override
 
void HandleDone (bool success) override
 
bool IsCachedResultValid (const ResponseHeaders &headers) override
 

Additional Inherited Members

- Static Public Member Functions inherited from net_instaweb::AsyncFetch
static bool IsGoogleCacheVia (StringPiece via_value)
 
- Static Public Attributes inherited from net_instaweb::AsyncFetch
static const int kContentLengthUnknown = -1
 

Detailed Description

Implements an AsyncFetch subclass that notifies a WorkerTestBase::SyncPoint upon completion. This is intended for testing.

Member Function Documentation

bool net_instaweb::NotifyingFetch::IsCachedResultValid ( const ResponseHeaders headers)
overrideprotectedvirtual

Is the cache entry corresponding to headers valid? Default is that it is valid. Sub-classes can provide specific implementations, e.g., based on cache invalidation timestamp in domain specific options. Used by CacheUrlAsyncFetcher.

Todo:
TODO(nikhilmadan): Consider making this virtual so that subclass authors are forced to look at this function.

Reimplemented from net_instaweb::AsyncFetch.


The documentation for this class was generated from the following file: