#include <BodyPipe.h>

Inheritance diagram for BodyConsumer:
Collaboration diagram for BodyConsumer:

Public Types

typedef CbcPointer< BodyConsumerPointer

Public Member Functions

 BodyConsumer ()
 ~BodyConsumer () override
virtual void noteMoreBodyDataAvailable (RefCount< BodyPipe > bp)=0
virtual void noteBodyProductionEnded (RefCount< BodyPipe > bp)=0
virtual void noteBodyProducerAborted (RefCount< BodyPipe > bp)=0
bool canBeCalled (AsyncCall &call) const
 whether we can be called More...
void callStart (AsyncCall &call)
virtual void callEnd ()
 called right after the called job method More...
virtual void callException (const std::exception &e)
 called when the job throws during an async call More...
void handleStopRequest ()
 process external request to terminate now (i.e. during this async call) More...
virtual void * toCbdata ()=0

Static Public Member Functions

static void Start (const Pointer &job)
static void RegisterWithCacheManager ()

Public Attributes

const InstanceId< AsyncJobid
 job identifier More...

Protected Member Functions

void stopConsumingFrom (RefCount< BodyPipe > &)
void deleteThis (const char *aReason)
void mustStop (const char *aReason)
bool done () const
 the job is destroyed in callEnd() when done() More...
virtual void start ()
 called by AsyncStart; do not call directly More...
virtual bool doneAll () const
 whether positive goal has been reached More...
virtual void swanSong ()
virtual const char * status () const
 internal cleanup; do not call directly More...

Static Protected Member Functions

static void ReportAllJobs (StoreEntry *)
 writes a cache manager report about all jobs existing in this worker More...

Protected Attributes

const char * stopReason
 reason for forcing done() to be true More...
const char * typeName
 kid (leaf) class name, for debugging More...
AsyncCall::Pointer inCall
 the asynchronous call being handled, if any More...
bool started_ = false
 Start() has finished successfully. More...
bool swanSang_ = false
 swanSong() was called More...

Private Member Functions

virtual void finalizedInCbdataChild ()=0
 hack: ensure CBDATA_CHILD() after a toCbdata()-defining CBDATA_INTERMEDIATE() More...

Detailed Description

Interface for those who want to consume body content from others. BodyConsumer is expected to register with an existing BodyPipe by calling BodyPipe::setConsumer(). One pipe cannot have more than one consumer.

Definition at line 42 of file BodyPipe.h.

Member Typedef Documentation

◆ Pointer

Definition at line 45 of file BodyPipe.h.

Constructor & Destructor Documentation

◆ BodyConsumer()

BodyConsumer::BodyConsumer ( )

Definition at line 47 of file BodyPipe.h.

◆ ~BodyConsumer()

BodyConsumer::~BodyConsumer ( )

Definition at line 48 of file BodyPipe.h.

Member Function Documentation

◆ callEnd()

void AsyncJob::callEnd ( )

◆ callException()

◆ callStart()

void AsyncJob::callStart ( AsyncCall call)

◆ canBeCalled()

bool AsyncJob::canBeCalled ( AsyncCall call) const

Definition at line 117 of file AsyncJob.cc.

References AsyncCall::cancel(), debugs, and AsyncJob::inCall.

◆ deleteThis()

void AsyncJob::deleteThis ( const char *  aReason)

◆ done()

bool AsyncJob::done ( ) const

◆ doneAll()

◆ finalizedInCbdataChild()

virtual void CbdataParent::finalizedInCbdataChild ( )
privatepure virtualinherited

◆ handleStopRequest()

void AsyncJob::handleStopRequest ( )

Definition at line 73 of file AsyncJob.h.

References AsyncJob::mustStop().

◆ mustStop()

◆ noteBodyProducerAborted()

virtual void BodyConsumer::noteBodyProducerAborted ( RefCount< BodyPipe bp)
pure virtual

◆ noteBodyProductionEnded()

virtual void BodyConsumer::noteBodyProductionEnded ( RefCount< BodyPipe bp)
pure virtual

◆ noteMoreBodyDataAvailable()

virtual void BodyConsumer::noteMoreBodyDataAvailable ( RefCount< BodyPipe bp)
pure virtual

◆ RegisterWithCacheManager()

void AsyncJob::RegisterWithCacheManager ( )

Definition at line 215 of file AsyncJob.cc.

References Mgr::RegisterAction(), and AsyncJob::ReportAllJobs().

Referenced by mainInitialize().

◆ ReportAllJobs()

void AsyncJob::ReportAllJobs ( StoreEntry e)

Definition at line 198 of file AsyncJob.cc.

References AllJobs().

Referenced by AsyncJob::RegisterWithCacheManager().

◆ start()

◆ Start()

◆ status()

◆ stopConsumingFrom()

◆ swanSong()

◆ toCbdata()

virtual void * CbdataParent::toCbdata ( )
pure virtualinherited

Member Data Documentation

◆ id

const InstanceId<AsyncJob> AsyncJob::id

Definition at line 75 of file AsyncJob.h.

◆ inCall

AsyncCall::Pointer AsyncJob::inCall

◆ started_

bool AsyncJob::started_ = false

Definition at line 88 of file AsyncJob.h.

Referenced by AsyncJob::~AsyncJob(), AsyncJob::callEnd(), and AsyncJob::Start().

◆ stopReason

const char* AsyncJob::stopReason

◆ swanSang_

bool AsyncJob::swanSang_ = false

Definition at line 89 of file AsyncJob.h.

Referenced by AsyncJob::~AsyncJob(), and AsyncJob::callEnd().

◆ typeName

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






Web Site Translations