provides Coordinator with a local cache manager response More...
#include <Filler.h>


Public Types | |
typedef CbcPointer< AsyncJob > | Pointer |
Public Member Functions | |
Filler (const Action::Pointer &anAction, const Comm::ConnectionPointer &conn, unsigned int aRequestId) | |
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... | |
virtual void * | toCbdata ()=0 |
Static Public Member Functions | |
static Pointer | Start (AsyncJob *job) |
starts a freshly created job (i.e., makes the job asynchronous) More... | |
Protected Member Functions | |
virtual void | start () |
called by AsyncStart; do not call directly More... | |
virtual void | swanSong () |
virtual bool | doneAll () const |
whether positive goal has been reached More... | |
void | scheduleStoreCopy () |
request more action results from the store More... | |
void | noteStoreCopied (StoreIOBuffer ioBuf) |
receive some action results from the store More... | |
void | scheduleCommWrite (const StoreIOBuffer &ioBuf) |
tell Comm to write action results More... | |
void | noteCommWrote (const CommIoCbParams ¶ms) |
called by Comm after the action results are written More... | |
void | noteCommClosed (const CommCloseCbParams ¶ms) |
called by Comm if the client socket got closed More... | |
void | close () |
closes the local connection to the HTTP client, if any More... | |
void | deleteThis (const char *aReason) |
void | mustStop (const char *aReason) |
bool | done () const |
the job is destroyed in callEnd() when done() More... | |
virtual const char * | status () const |
internal cleanup; do not call directly More... | |
Static Protected Member Functions | |
static void | NoteStoreCopied (void *data, StoreIOBuffer ioBuf) |
static void | HandleStoreAbort (StoreToCommWriter *param) |
called by Store if the entry is no longer usable More... | |
Protected Attributes | |
Comm::ConnectionPointer | clientConnection |
HTTP client descriptor. More... | |
StoreEntry * | entry |
store entry with the cache manager response More... | |
store_client * | sc |
our registration with the store More... | |
int64_t | writeOffset |
number of bytes written to the client More... | |
AsyncCall::Pointer | closer |
comm_close handler More... | |
char | buffer [HTTP_REQBUF_SZ] |
action results; Store fills, Comm writes More... | |
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< AsyncJob > | id |
job identifier More... | |
Private Member Functions | |
CBDATA_CLASS (Filler) | |
Private Attributes | |
Action::Pointer | action |
action that will run() and sendResponse() More... | |
unsigned int | requestId |
the ID of the Request we are responding to More... | |
Detailed Description
Member Typedef Documentation
◆ Pointer
|
inherited |
Definition at line 34 of file AsyncJob.h.
Constructor & Destructor Documentation
◆ Filler()
Mgr::Filler::Filler | ( | const Action::Pointer & | anAction, |
const Comm::ConnectionPointer & | conn, | ||
unsigned int | aRequestId | ||
) |
Member Function Documentation
◆ callEnd()
|
virtualinherited |
called right after the called job method
Reimplemented in Adaptation::Icap::Xaction.
Definition at line 136 of file AsyncJob.cc.
References AsyncCall::debugLevel, debugs, AsyncCall::debugSection, AsyncJob::done(), HERE(), AsyncJob::inCall, NULL, AsyncJob::status(), AsyncJob::swanSong(), and AsyncJob::typeName.
Referenced by Adaptation::Icap::Xaction::callEnd(), and AsyncJob::deleteThis().
◆ callException()
|
virtualinherited |
Reimplemented in ClientHttpRequest, Ftp::Server, Ipc::Inquirer, Ipc::Forwarder, Adaptation::Icap::Xaction, Adaptation::Icap::ServiceRep, Adaptation::Icap::ModXact, and ConnStateData.
Definition at line 127 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 114 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 101 of file AsyncJob.cc.
References AsyncCall::cancel(), debugs, HERE(), AsyncJob::inCall, and NULL.
◆ CBDATA_CLASS()
|
private |
◆ close()
|
protectedinherited |
closes our copy of the client HTTP connection socket
Definition at line 44 of file StoreToCommWriter.cc.
References comm_remove_close_handler(), Comm::IsConnOpen(), and NULL.
◆ deleteThis()
|
protectedinherited |
Definition at line 49 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 90 of file AsyncJob.cc.
References AsyncJob::doneAll(), NULL, and AsyncJob::stopReason.
Referenced by AsyncJob::callEnd(), HappyConnOpener::checkForNewConnection(), and Downloader::downloadFinished().
◆ doneAll()
|
protectedvirtualinherited |
Reimplemented from AsyncJob.
Definition at line 155 of file StoreToCommWriter.cc.
References STORE_OK.
◆ HandleStoreAbort()
|
staticprotectedinherited |
Definition at line 163 of file StoreToCommWriter.cc.
References Mgr::StoreToCommWriter::clientConnection, Comm::Connection::close(), and Comm::IsConnOpen().
Referenced by Mgr::StoreToCommWriter::start().
◆ mustStop()
|
protectedinherited |
Definition at line 69 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(), HttpStateData::httpStateConnClosed(), HttpStateData::httpTimeout(), Comm::ConnOpener::noteAbort(), HttpStateData::proceedAfter1xx(), ConnStateData::proxyProtocolError(), HttpStateData::readReply(), HttpStateData::start(), and HttpStateData::wroteLast().
◆ noteCommClosed()
|
protectedinherited |
Definition at line 131 of file StoreToCommWriter.cc.
References debugs, HERE(), Comm::IsConnOpen(), and Must.
Referenced by Mgr::StoreToCommWriter::StoreToCommWriter().
◆ noteCommWrote()
|
protectedinherited |
Definition at line 119 of file StoreToCommWriter.cc.
References debugs, CommCommonCbParams::fd, CommCommonCbParams::flag, HERE(), Must, NULL, Comm::OK, and CommIoCbParams::size.
Referenced by Mgr::StoreToCommWriter::scheduleCommWrite().
◆ noteStoreCopied()
|
protectedinherited |
Definition at line 94 of file StoreToCommWriter.cc.
References debugs, StoreIOBuffer::error, StoreIOBuffer::flags, HERE(), StoreIOBuffer::length, and Must.
Referenced by Mgr::StoreToCommWriter::NoteStoreCopied().
◆ NoteStoreCopied()
|
staticprotectedinherited |
Definition at line 81 of file StoreToCommWriter.cc.
References asyncCall(), data, Must, Mgr::StoreToCommWriter::noteStoreCopied(), NULL, and ScheduleCallHere.
◆ scheduleCommWrite()
|
protectedinherited |
Definition at line 105 of file StoreToCommWriter.cc.
References asyncCall(), StoreIOBuffer::data, debugs, HERE(), Comm::IsConnOpen(), StoreIOBuffer::length, Must, Mgr::StoreToCommWriter::noteCommWrote(), NULL, and Comm::Write().
◆ scheduleStoreCopy()
|
protectedinherited |
Definition at line 71 of file StoreToCommWriter.cc.
References debugs, HERE(), Must, NULL, sc, and storeClientCopy().
◆ start()
|
protectedvirtual |
Reimplemented from Mgr::StoreToCommWriter.
Definition at line 30 of file Filler.cc.
References action(), debugs, HERE(), Must, NULL, and Mgr::StoreToCommWriter::start().
◆ Start()
|
staticinherited |
Definition at line 23 of file AsyncJob.cc.
References CallJobHere, and AsyncJob::start().
Referenced by Ftp::Server::AcceptCtrlConnection(), Ftp::Server::checkDataConnPre(), clientListenerConnectionOpened(), Ftp::Client::connectDataChannel(), FwdState::connectStart(), Adaptation::Icap::Xaction::dnsLookupDone(), Log::TcpLogger::doConnect(), FwdState::establishTunnelThruProxy(), TunnelStateData::establishTunnelThruProxy(), Ipc::Coordinator::handleCacheMgrRequest(), PeerPoolMgr::handleOpenedConnection(), Ipc::Coordinator::handleSnmpRequest(), httpAccept(), httpsAccept(), httpStart(), idnsInitVC(), Ftp::Gateway::listenForDataChannel(), Ftp::Server::listenForDataConnection(), Adaptation::Icap::Xaction::noteCommConnected(), Log::TcpLogger::Open(), HappyConnOpener::openFreshConnection(), PeerPoolMgr::openNewConnection(), peerProbeConnect(), Mgr::FunAction::respond(), Mgr::InfoAction::respond(), FwdState::secureConnectionToPeer(), TunnelStateData::secureConnectionToPeer(), Ipc::SendMessage(), Mgr::Inquirer::sendResponse(), snmpConstructReponse(), SquidMain(), CacheManager::start(), Ident::Start(), Adaptation::AccessCheck::Start(), Rock::Rebuild::Start(), Security::PeerConnector::startCertDownloading(), TunnelStateData::startConnecting(), 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 159 of file AsyncJob.cc.
References buf, NULL, and AsyncJob::stopReason.
Referenced by AsyncJob::callEnd(), AsyncJob::callStart(), Adaptation::Initiate::status(), and Comm::TcpAcceptor::status().
◆ swanSong()
|
protectedvirtual |
Reimplemented from Mgr::StoreToCommWriter.
Definition at line 41 of file Filler.cc.
References action(), debugs, HERE(), and Mgr::StoreToCommWriter::swanSong().
◆ toCbdata()
|
pure virtualinherited |
Implemented in HttpStateData, ClientHttpRequest, and BodySink.
Referenced by AsyncJob::callException(), and AsyncJob::callStart().
Member Data Documentation
◆ action
|
private |
◆ buffer
|
protectedinherited |
Definition at line 68 of file StoreToCommWriter.h.
◆ clientConnection
|
protectedinherited |
Definition at line 61 of file StoreToCommWriter.h.
Referenced by Mgr::StoreToCommWriter::StoreToCommWriter(), and Mgr::StoreToCommWriter::HandleStoreAbort().
◆ closer
|
protectedinherited |
Definition at line 67 of file StoreToCommWriter.h.
Referenced by Mgr::StoreToCommWriter::StoreToCommWriter().
◆ entry
|
protectedinherited |
Definition at line 63 of file StoreToCommWriter.h.
◆ id
|
protectedinherited |
Definition at line 72 of file AsyncJob.h.
◆ inCall
|
protectedinherited |
Definition at line 71 of file AsyncJob.h.
Referenced by AsyncJob::callEnd(), AsyncJob::callStart(), AsyncJob::canBeCalled(), AsyncJob::deleteThis(), and AsyncJob::mustStop().
◆ requestId
◆ sc
|
protectedinherited |
Definition at line 64 of file StoreToCommWriter.h.
◆ stopReason
|
protectedinherited |
Definition at line 69 of file AsyncJob.h.
Referenced by AsyncJob::deleteThis(), AsyncJob::done(), AsyncJob::mustStop(), AsyncJob::status(), and HappyConnOpener::status().
◆ typeName
|
protectedinherited |
Definition at line 70 of file AsyncJob.h.
Referenced by AsyncJob::AsyncJob(), Adaptation::Icap::Xaction::Xaction(), AsyncJob::~AsyncJob(), AsyncJob::callEnd(), AsyncJob::callStart(), AsyncJob::deleteThis(), and AsyncJob::mustStop().
◆ writeOffset
|
protectedinherited |
Definition at line 65 of file StoreToCommWriter.h.
The documentation for this class was generated from the following files: