9#ifndef SQUID_SRC_ADAPTATION_ICAP_XACTION_H
10#define SQUID_SRC_ADAPTATION_ICAP_XACTION_H
25class IcapPeerConnector;
70 void start()
override;
106 const char *
status()
const override;
bool isRetriable
can retry on persistent connection failures
int attempts
the number of times we tried to get to the service, including this time
void handleSecuredPeer(Security::EncryptorAnswer &answer)
void noteCommConnected(const CommConnectCbParams &io)
called when the connection attempt to an ICAP service completes (successfully or not)
void start() override
called by AsyncStart; do not call directly
AsyncCall::Pointer reader
void noteCommWrote(const CommIoCbParams &io)
void callException(const std::exception &e) override
called when the job throws during an async call
Comm::ConnectionPointer connection
open and, if necessary, secured connection to the ICAP server (or nil)
bool haveConnection() const
virtual void handleCommRead(size_t sz)=0
JobWait< Ssl::IcapPeerConnector > encryptionWait
waits for the established transport connection to be secured/encrypted
virtual bool fillVirginHttpHeader(MemBuf &) const
AccessLogEntry::Pointer alep
icap.log entry
HttpReply::Pointer icapReply
received ICAP reply, if any
AsyncCall::Pointer closer
HttpRequest * icapRequest
sent (or at least created) ICAP request
bool parseHttpMsg(Http::Message *msg)
void useTransportConnection(const Comm::ConnectionPointer &)
bool isRepeatable
can repeat if no or unsatisfactory response
void useIcapConnection(const Comm::ConnectionPointer &)
react to the availability of a fully-ready ICAP connection
void noteCommClosed(const CommCloseCbParams &io)
void dieOnConnectionFailure()
virtual AccessLogEntry::Pointer masterLogEntry()
bool waitingForDns
expecting a ipcache_nbgethostbyname() callback
virtual bool doneReading() const
Adaptation::Icap::ServiceRep::Pointer theService
bool doneAll() const override
whether positive goal has been reached
virtual bool doneWriting() const
JobWait< Comm::ConnOpener > transportWait
waits for a transport connection to the ICAP server to be established/opened
virtual void startShoveling()=0
starts sending/receiving ICAP messages
virtual void fillDoneStatus(MemBuf &buf) const
void disableRepeats(const char *reason)
virtual void detailError(const ErrorDetailPointer &)
record error detail if possible
void dnsLookupDone(std::optional< Ip::Address >)
const char * status() const override
internal cleanup; do not call directly
void noteCommRead(const CommIoCbParams &io)
void noteInitiatorAborted() override
AccessLogEntry & al
short for *alep
virtual void clearError()
clear stored error details, if any; used for retries/repeats
void scheduleWrite(MemBuf &buf)
AsyncCall::Pointer writer
virtual void fillPendingStatus(MemBuf &buf) const
void callEnd() override
called right after the called job method
void setOutcome(const XactOutcome &xo)
virtual void handleCommWrote(size_t sz)=0
void noteCommTimedout(const CommTimeoutCbParams &io)
virtual void finalizeLogInfo()
common parts of HttpRequest and HttpReply
const char * XactOutcome
transaction result for logging