

Public Types | |
typedef CbcPointer< BodyConsumer > | Pointer |
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... | |
void | handleStopRequest () |
process external request to terminate now (i.e. during this async call) More... | |
Static Public Member Functions | |
static void | Start (const Pointer &job) |
Public Attributes | |
const InstanceId< AsyncJob > | id |
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 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 BodyPipe.cc.
Member Typedef Documentation
◆ Pointer
|
inherited |
Definition at line 45 of file BodyPipe.h.
Constructor & Destructor Documentation
◆ BodySink()
|
inline |
Definition at line 21 of file BodyPipe.cc.
◆ ~BodySink()
|
inlinevirtual |
Definition at line 22 of file BodyPipe.cc.
Member Function Documentation
◆ callEnd()
|
virtualinherited |
called right after the called job method
Reimplemented in Adaptation::Icap::Xaction.
Definition at line 137 of file AsyncJob.cc.
References assert, AsyncCall::debugLevel, debugs, AsyncCall::debugSection, AsyncJob::done(), AsyncJob::inCall, NULL, AsyncJob::started_, AsyncJob::status(), AsyncJob::swanSang_, AsyncJob::swanSong(), and AsyncJob::typeName.
Referenced by Adaptation::Icap::Xaction::callEnd(), and AsyncJob::deleteThis().
◆ callException()
|
virtualinherited |
Reimplemented in Ftp::Server, Ipc::Inquirer, Ipc::Forwarder, Adaptation::Icap::Xaction, Adaptation::Icap::ServiceRep, Adaptation::Icap::ModXact, ClientHttpRequest, and ConnStateData.
Definition at line 128 of file AsyncJob.cc.
References cbdataReferenceValid(), debugs, Must, AsyncJob::mustStop(), and CbdataParent::toCbdata().
Referenced by ConnStateData::callException(), Adaptation::Icap::Xaction::callException(), Ipc::Forwarder::callException(), Ipc::Inquirer::callException(), and Ftp::Server::callException().
◆ callStart()
|
inherited |
called just before the called method
Definition at line 115 of file AsyncJob.cc.
References cbdataReferenceValid(), AsyncCall::debugLevel, debugs, AsyncCall::debugSection, AsyncJob::inCall, Must, AsyncJob::status(), CbdataParent::toCbdata(), and AsyncJob::typeName.
◆ canBeCalled()
|
inherited |
Definition at line 102 of file AsyncJob.cc.
References AsyncCall::cancel(), debugs, AsyncJob::inCall, and NULL.
◆ deleteThis()
|
protectedinherited |
Definition at line 50 of file AsyncJob.cc.
References asyncCall(), AsyncJob::callEnd(), debugs, AsyncJob::inCall, JobMemFun(), Must, NULL, AsyncJob::stopReason, and AsyncJob::typeName.
Referenced by ConnStateData::connStateClosed().
◆ done()
|
protectedinherited |
Definition at line 91 of file AsyncJob.cc.
References AsyncJob::doneAll(), NULL, and AsyncJob::stopReason.
Referenced by AsyncJob::callEnd(), HappyConnOpener::checkForNewConnection(), Downloader::downloadFinished(), and HappyConnOpener::maybeOpenPrimeConnection().
◆ doneAll()
|
inlinevirtual |
Reimplemented from AsyncJob.
Definition at line 34 of file BodyPipe.cc.
References body_pipe, and AsyncJob::doneAll().
◆ handleStopRequest()
|
inlineinherited |
Definition at line 71 of file AsyncJob.h.
References AsyncJob::mustStop().
◆ mustStop()
|
protectedinherited |
Definition at line 70 of file AsyncJob.cc.
References debugs, AsyncJob::inCall, Must, NULL, AsyncJob::stopReason, and AsyncJob::typeName.
Referenced by HttpStateData::abortAll(), AsyncJob::callException(), HttpStateData::continueAfterParsingHeader(), HttpStateData::drop1xx(), HttpStateData::handleMoreRequestBodyAvailable(), AsyncJob::handleStopRequest(), HttpStateData::httpStateConnClosed(), HttpStateData::httpTimeout(), HttpStateData::proceedAfter1xx(), ConnStateData::proxyProtocolError(), HttpStateData::readReply(), HttpStateData::start(), and HttpStateData::wroteLast().
◆ noteBodyProducerAborted()
|
inlinevirtual |
Implements BodyConsumer.
Definition at line 31 of file BodyPipe.cc.
References body_pipe, and BodyConsumer::stopConsumingFrom().
◆ noteBodyProductionEnded()
|
inlinevirtual |
Implements BodyConsumer.
Definition at line 28 of file BodyPipe.cc.
References body_pipe, and BodyConsumer::stopConsumingFrom().
◆ noteMoreBodyDataAvailable()
|
inlinevirtual |
Implements BodyConsumer.
Definition at line 24 of file BodyPipe.cc.
References BodyPipe::buf(), BodyPipe::consume(), and MemBuf::contentSize().
◆ operator delete()
|
inline |
Definition at line 18 of file BodyPipe.cc.
◆ operator new()
|
inline |
Definition at line 18 of file BodyPipe.cc.
◆ start()
|
protectedvirtualinherited |
Reimplemented in Ipc::Port, Ftp::Server, HappyConnOpener, Rock::Rebuild, Rock::HeaderUpdater, Snmp::Inquirer, Server, Http::One::Server, Security::PeerConnector, PeerPoolMgr, Mgr::StoreToCommWriter, Mgr::Inquirer, Mgr::Filler, Mgr::ActionWriter, Log::TcpLogger, Ipc::UdsSender, Ipc::Strand, Ipc::Inquirer, Ipc::Forwarder, Ipc::Coordinator, HttpStateData, Downloader, Comm::TcpAcceptor, Comm::ConnOpener, Http::Tunneler, Ftp::Relay, Ftp::Gateway, Ftp::Client, ConnStateData, Adaptation::Iterator, Adaptation::Icap::Xaction, Adaptation::Icap::OptXact, Adaptation::Icap::ModXact, Adaptation::Icap::Launcher, Adaptation::Ecap::XactionRep, and Adaptation::AccessCheck.
Definition at line 44 of file AsyncJob.cc.
Referenced by Adaptation::AccessCheck::start(), Adaptation::Icap::Launcher::start(), Adaptation::Icap::Xaction::start(), Adaptation::Iterator::start(), ConnStateData::start(), Http::Tunneler::start(), Ipc::UdsSender::start(), PeerPoolMgr::start(), Security::PeerConnector::start(), Ipc::Port::start(), and AsyncJob::Start().
◆ Start()
|
staticinherited |
Promises to start the configured job (eventually). The job is deemed to be running asynchronously beyond this point, so the caller should only access the job object via AsyncCalls rather than directly.
swanSong() is only called for jobs for which this method has returned successfully (i.e. without throwing).
Definition at line 24 of file AsyncJob.cc.
References CallJobHere, AsyncJob::start(), and AsyncJob::started_.
Referenced by Ftp::Server::AcceptCtrlConnection(), clientListenerConnectionOpened(), Ipc::Coordinator::handleCacheMgrRequest(), Ipc::Coordinator::handleSnmpRequest(), httpAccept(), httpsAccept(), httpStart(), idnsInitVC(), Ftp::Gateway::listenForDataChannel(), Ftp::Server::listenForDataConnection(), Log::TcpLogger::Open(), peerProbeConnect(), Mgr::FunAction::respond(), Mgr::InfoAction::respond(), Ipc::SendMessage(), Mgr::Inquirer::sendResponse(), snmpConstructReponse(), SquidMain(), CacheManager::start(), Adaptation::AccessCheck::Start(), Rock::Rebuild::Start(), JobWaitBase::start_(), BodyPipe::startAutoConsumptionIfNeeded(), Ftp::StartGateway(), Ftp::StartRelay(), PeerPoolMgrsRr::syncConfig(), and Rock::SwapDir::updateHeaders().
◆ status()
|
protectedvirtualinherited |
for debugging, starts with space
Reimplemented in HappyConnOpener, Security::PeerConnector, Ipc::Inquirer, Comm::TcpAcceptor, Http::Tunneler, Adaptation::Initiate, Adaptation::Icap::Xaction, Adaptation::Icap::ServiceRep, and Adaptation::Ecap::XactionRep.
Definition at line 167 of file AsyncJob.cc.
References MemBuf::append(), Packable::appendf(), MemBuf::content(), NULL, MemBuf::reset(), AsyncJob::stopReason, and MemBuf::terminate().
Referenced by AsyncJob::callEnd(), AsyncJob::callStart(), Adaptation::Initiate::status(), and Comm::TcpAcceptor::status().
◆ stopConsumingFrom()
Definition at line 118 of file BodyPipe.cc.
References assert, BodyPipe::clearConsumer(), debugs, and NULL.
Referenced by ClientHttpRequest::~ClientHttpRequest(), Client::cleanAdaptation(), Client::doneSendingRequestBody(), Client::endAdaptedBodyConsumption(), ClientHttpRequest::endRequestSatisfaction(), Client::handleAdaptedBodyProducerAborted(), Client::handleRequestBodyProducerAborted(), noteBodyProducerAborted(), ClientHttpRequest::noteBodyProducerAborted(), noteBodyProductionEnded(), Client::serverComplete(), and Client::swanSong().
◆ swanSong()
|
inlineprotectedvirtualinherited |
Reimplemented in HappyConnOpener, Rock::Rebuild, Rock::HeaderUpdater, Snmp::Forwarder, Server, Security::PeerConnector, PeerPoolMgr, Mgr::StoreToCommWriter, Mgr::Forwarder, Mgr::Filler, Log::TcpLogger, Ipc::UdsSender, Ipc::Inquirer, Ipc::Forwarder, Downloader, Comm::TcpAcceptor, Comm::ConnOpener, Http::Tunneler, Ftp::Relay, Client, ConnStateData, Adaptation::Iterator, Adaptation::Initiate, Adaptation::Icap::Xaction, Adaptation::Icap::OptXact, Adaptation::Icap::ModXactLauncher, Adaptation::Icap::ModXact, Adaptation::Icap::Launcher, and Adaptation::Ecap::XactionRep.
Definition at line 59 of file AsyncJob.h.
Referenced by AsyncJob::callEnd(), Client::swanSong(), Http::Tunneler::swanSong(), Comm::ConnOpener::swanSong(), Comm::TcpAcceptor::swanSong(), Ipc::UdsSender::swanSong(), Log::TcpLogger::swanSong(), PeerPoolMgr::swanSong(), Security::PeerConnector::swanSong(), Server::swanSong(), Rock::HeaderUpdater::swanSong(), and HappyConnOpener::swanSong().
◆ toCbdata()
|
inlinevirtualnoexcept |
Implements CbdataParent.
Definition at line 18 of file BodyPipe.cc.
Member Data Documentation
◆ body_pipe
|
private |
Definition at line 37 of file BodyPipe.cc.
Referenced by ~BodySink(), doneAll(), noteBodyProducerAborted(), and noteBodyProductionEnded().
◆ CBDATA_BodySink
|
staticprivate |
Definition at line 18 of file BodyPipe.cc.
◆ id
|
inherited |
Definition at line 73 of file AsyncJob.h.
◆ inCall
|
protectedinherited |
Definition at line 81 of file AsyncJob.h.
Referenced by AsyncJob::callEnd(), AsyncJob::callStart(), AsyncJob::canBeCalled(), AsyncJob::deleteThis(), and AsyncJob::mustStop().
◆ started_
|
protectedinherited |
Definition at line 83 of file AsyncJob.h.
Referenced by AsyncJob::~AsyncJob(), AsyncJob::callEnd(), and AsyncJob::Start().
◆ stopReason
|
protectedinherited |
Definition at line 79 of file AsyncJob.h.
Referenced by AsyncJob::deleteThis(), AsyncJob::done(), AsyncJob::mustStop(), AsyncJob::status(), and HappyConnOpener::status().
◆ swanSang_
|
protectedinherited |
Definition at line 84 of file AsyncJob.h.
Referenced by AsyncJob::~AsyncJob(), and AsyncJob::callEnd().
◆ typeName
|
protectedinherited |
Definition at line 80 of file AsyncJob.h.
Referenced by AsyncJob::AsyncJob(), Adaptation::Icap::Xaction::Xaction(), AsyncJob::~AsyncJob(), AsyncJob::callEnd(), AsyncJob::callStart(), AsyncJob::deleteThis(), and AsyncJob::mustStop().
The documentation for this class was generated from the following file:
- src/BodyPipe.cc