Inheritance diagram for BodySink:
Collaboration diagram for BodySink:

Public Types

typedef CbcPointer< BodyConsumerPointer

Public Member Functions

void * operator new (size_t size)
void operator delete (void *address)
void * toCbdata () noexcept
 BodySink (const BodyPipe::Pointer &bp)
virtual ~BodySink ()
virtual void noteMoreBodyDataAvailable (BodyPipe::Pointer bp)
virtual void noteBodyProductionEnded (BodyPipe::Pointer)
virtual void noteBodyProducerAborted (BodyPipe::Pointer)
bool doneAll () const
 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...

Static Public Member Functions

static Pointer Start (AsyncJob *job)
 starts a freshly created job (i.e., makes the job asynchronous) 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...
const InstanceId< AsyncJobid
 job identifier More...

Private Attributes

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

Static Private Attributes

static cbdata_type CBDATA_BodySink = CBDATA_UNKNOWN

Detailed Description

Definition at line 16 of file

Member Typedef Documentation

◆ Pointer

Definition at line 45 of file BodyPipe.h.

Constructor & Destructor Documentation

◆ BodySink()

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

Definition at line 21 of file

◆ ~BodySink()

virtual BodySink::~BodySink ( )

Definition at line 22 of file

References assert, and body_pipe.

Member Function Documentation

◆ callEnd()

void AsyncJob::callEnd ( )

◆ callException()

◆ callStart()

void AsyncJob::callStart ( AsyncCall call)

◆ canBeCalled()

bool AsyncJob::canBeCalled ( AsyncCall call) const

Definition at line 101 of file

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

Referenced by AsyncJob::swanSong().

◆ deleteThis()

void AsyncJob::deleteThis ( const char *  aReason)

◆ done()

◆ doneAll()

bool BodySink::doneAll ( ) const

Reimplemented from AsyncJob.

Definition at line 34 of file

References body_pipe, and AsyncJob::doneAll().

◆ mustStop()

void AsyncJob::mustStop ( const char *  aReason)

Definition at line 69 of file

References debugs, AsyncJob::inCall, Must, NULL, AsyncJob::stopReason, and AsyncJob::typeName.

Referenced by HttpStateData::abortAll(), Ftp::Client::abortAll(), Comm::TcpAcceptor::acceptOne(), Adaptation::Ecap::XactionRep::adaptationAborted(), Adaptation::AccessCheck::callBack(), AsyncJob::callException(), Security::PeerConnector::connectionClosed(), HttpStateData::continueAfterParsingHeader(), Ftp::Client::ctrlClosed(), Adaptation::Iterator::handleAdaptationBlock(), Adaptation::Iterator::handleAdaptationError(), Log::TcpLogger::handleClosure(), Adaptation::Icap::Xaction::handleCommClosed(), Http::Tunneler::handleConnectionClosure(), Mgr::Forwarder::handleError(), Ipc::Forwarder::handleError(), Ipc::Forwarder::handleException(), Ipc::Inquirer::handleException(), HttpStateData::handleMoreRequestBodyAvailable(), Ipc::Inquirer::handleRemoteAck(), Ipc::Forwarder::handleTimeout(), HttpStateData::httpStateConnClosed(), HttpStateData::httpTimeout(), Comm::ConnOpener::noteAbort(), Adaptation::Icap::ModXact::noteBodyConsumerAborted(), Snmp::Forwarder::noteCommClosed(), Snmp::Inquirer::noteCommClosed(), Mgr::Inquirer::noteCommClosed(), Mgr::Forwarder::noteCommClosed(), Mgr::StoreToCommWriter::noteCommClosed(), Adaptation::Icap::Xaction::noteCommRead(), Rock::HeaderUpdater::noteDoneReading(), Adaptation::Iterator::noteInitiatorAborted(), Adaptation::Icap::Xaction::noteInitiatorAborted(), Adaptation::Ecap::XactionRep::noteInitiatorAborted(), HttpStateData::readReply(), Comm::ConnOpener::sendAnswer(), Rock::Rebuild::start(), Security::PeerConnector::start(), HttpStateData::start(), Ipc::UdsSender::timedout(), and HttpStateData::wroteLast().

◆ noteBodyProducerAborted()

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

Implements BodyConsumer.

Definition at line 31 of file

References body_pipe, and BodyConsumer::stopConsumingFrom().

◆ noteBodyProductionEnded()

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

Implements BodyConsumer.

Definition at line 28 of file

References body_pipe, and BodyConsumer::stopConsumingFrom().

◆ noteMoreBodyDataAvailable()

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

Implements BodyConsumer.

Definition at line 24 of file

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

◆ operator delete()

void BodySink::operator delete ( void *  address)

Definition at line 18 of file

◆ operator new()

void* BodySink::operator new ( size_t  size)

Definition at line 18 of file

◆ Start()

◆ start()

◆ status()

◆ stopConsumingFrom()

◆ swanSong()

◆ toCbdata()

void* BodySink::toCbdata ( )

Implements CbdataParent.

Definition at line 18 of file

Member Data Documentation

◆ body_pipe

BodyPipe::Pointer BodySink::body_pipe

Definition at line 37 of file

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

◆ CBDATA_BodySink

cbdata_type BodySink::CBDATA_BodySink = CBDATA_UNKNOWN

Definition at line 18 of file

◆ id

const InstanceId<AsyncJob> AsyncJob::id

Definition at line 72 of file AsyncJob.h.

◆ inCall

◆ stopReason

const char* AsyncJob::stopReason

◆ typeName

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






Web Site Translations