Inheritance diagram for BodySink:
Collaboration diagram for BodySink:

Public Types

typedef CbcPointer< BodyConsumerPointer
 

Public Member Functions

 BodySink (const BodyPipe::Pointer &bp)
 
 ~BodySink () override
 
void noteMoreBodyDataAvailable (BodyPipe::Pointer bp) override
 
void noteBodyProductionEnded (BodyPipe::Pointer) override
 
void noteBodyProducerAborted (BodyPipe::Pointer) override
 
bool doneAll () const override
 whether positive goal has been reached More...
 
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)
 

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 void swanSong ()
 
virtual const char * status () const
 internal cleanup; do not call directly 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

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

Private Attributes

BodyPipe::Pointer body_pipe
 the pipe we are consuming from More...
 

Detailed Description

Definition at line 16 of file BodyPipe.cc.

Member Typedef Documentation

◆ Pointer

Definition at line 45 of file BodyPipe.h.

Constructor & Destructor Documentation

◆ BodySink()

BodySink::BodySink ( const BodyPipe::Pointer bp)
inline

Definition at line 21 of file BodyPipe.cc.

◆ ~BodySink()

BodySink::~BodySink ( )
inlineoverride

Definition at line 22 of file BodyPipe.cc.

References assert, and body_pipe.

Member Function Documentation

◆ callEnd()

void AsyncJob::callEnd ( )
virtualinherited

◆ callException()

◆ callStart()

void AsyncJob::callStart ( AsyncCall call)
inherited

◆ canBeCalled()

bool AsyncJob::canBeCalled ( AsyncCall call) const
inherited

Definition at line 102 of file AsyncJob.cc.

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

◆ CBDATA_CHILD()

BodySink::CBDATA_CHILD ( BodySink  )
private

◆ deleteThis()

void AsyncJob::deleteThis ( const char *  aReason)
protectedinherited

◆ done()

bool AsyncJob::done ( ) const
protectedinherited

◆ doneAll()

bool BodySink::doneAll ( ) const
inlineoverridevirtual

Reimplemented from AsyncJob.

Definition at line 34 of file BodyPipe.cc.

References body_pipe, and AsyncJob::doneAll().

◆ finalizedInCbdataChild()

virtual void CbdataParent::finalizedInCbdataChild ( )
privatepure virtualinherited

◆ handleStopRequest()

void AsyncJob::handleStopRequest ( )
inlineinherited

Definition at line 71 of file AsyncJob.h.

References AsyncJob::mustStop().

◆ mustStop()

◆ noteBodyProducerAborted()

void BodySink::noteBodyProducerAborted ( BodyPipe::Pointer  )
inlineoverridevirtual

Implements BodyConsumer.

Definition at line 31 of file BodyPipe.cc.

References body_pipe, and BodyConsumer::stopConsumingFrom().

◆ noteBodyProductionEnded()

void BodySink::noteBodyProductionEnded ( BodyPipe::Pointer  )
inlineoverridevirtual

Implements BodyConsumer.

Definition at line 28 of file BodyPipe.cc.

References body_pipe, and BodyConsumer::stopConsumingFrom().

◆ noteMoreBodyDataAvailable()

void BodySink::noteMoreBodyDataAvailable ( BodyPipe::Pointer  bp)
inlineoverridevirtual

Implements BodyConsumer.

Definition at line 24 of file BodyPipe.cc.

References BodyPipe::buf(), BodyPipe::consume(), and MemBuf::contentSize().

◆ start()

◆ Start()

◆ status()

◆ stopConsumingFrom()

◆ swanSong()

◆ toCbdata()

virtual void * CbdataParent::toCbdata ( )
pure virtualinherited

Member Data Documentation

◆ body_pipe

BodyPipe::Pointer BodySink::body_pipe
private

Definition at line 37 of file BodyPipe.cc.

Referenced by ~BodySink(), doneAll(), noteBodyProducerAborted(), and noteBodyProductionEnded().

◆ id

const InstanceId<AsyncJob> AsyncJob::id
inherited

Definition at line 73 of file AsyncJob.h.

◆ inCall

AsyncCall::Pointer AsyncJob::inCall
protectedinherited

◆ started_

bool AsyncJob::started_ = false
protectedinherited

Definition at line 83 of file AsyncJob.h.

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

◆ stopReason

const char* AsyncJob::stopReason
protectedinherited

◆ swanSang_

bool AsyncJob::swanSang_ = false
protectedinherited

Definition at line 84 of file AsyncJob.h.

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

◆ typeName


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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors