#include <OptXact.h>

Inheritance diagram for Adaptation::Icap::OptXact:
Collaboration diagram for Adaptation::Icap::OptXact:

Public Types

typedef CbcPointer< AsyncJobPointer
 

Public Member Functions

 OptXact (ServiceRep::Pointer &aService)
 
void disableRetries ()
 
void disableRepeats (const char *reason)
 
bool retriable () const
 
bool repeatable () const
 
void noteCommConnected (const CommConnectCbParams &io)
 
void noteCommWrote (const CommIoCbParams &io)
 
void noteCommRead (const CommIoCbParams &io)
 
void noteCommTimedout (const CommTimeoutCbParams &io)
 
void noteCommClosed (const CommCloseCbParams &io)
 
virtual void callException (const std::exception &e)
 called when the job throws during an async call More...
 
virtual void callEnd ()
 called right after the called job method More...
 
virtual void clearError ()
 clear stored error details, if any; used for retries/repeats More...
 
virtual AccessLogEntry::Pointer masterLogEntry ()
 
void dnsLookupDone (const ipcache_addrs *ia)
 
ServiceRepservice ()
 
void initiator (const CbcPointer< Initiator > &i)
 sets initiator More...
 
bool canBeCalled (AsyncCall &call) const
 whether we can be called More...
 
void callStart (AsyncCall &call)
 
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...
 

Public Attributes

HttpRequesticapRequest
 sent (or at least created) ICAP request More...
 
HttpReply::Pointer icapReply
 received ICAP reply, if any More...
 
int attempts
 the number of times we tried to get to the service, including this time More...
 

Protected Member Functions

virtual void start ()
 called by AsyncStart; do not call directly More...
 
virtual void handleCommConnected ()
 
virtual void handleCommWrote (size_t size)
 
virtual void handleCommRead (size_t size)
 
void makeRequest (MemBuf &buf)
 
bool parseResponse ()
 
void startReading ()
 
virtual bool doneReading () const
 
virtual void swanSong ()
 
virtual void noteInitiatorAborted ()
 
virtual void handleCommTimedout ()
 
virtual void handleCommClosed ()
 
void handleSecuredPeer (Security::EncryptorAnswer &answer)
 
virtual void detailError (int)
 record error detail if possible More...
 
void openConnection ()
 
void closeConnection ()
 
void dieOnConnectionFailure ()
 
bool haveConnection () const
 
void scheduleRead ()
 
void scheduleWrite (MemBuf &buf)
 
void updateTimeout ()
 
void cancelRead ()
 
bool parseHttpMsg (Http::Message *msg)
 
bool mayReadMore () const
 
virtual bool doneWriting () const
 
bool doneWithIo () const
 
virtual bool doneAll () const
 whether positive goal has been reached More...
 
virtual const char * status () const
 internal cleanup; do not call directly More...
 
virtual void fillPendingStatus (MemBuf &buf) const
 
virtual void fillDoneStatus (MemBuf &buf) const
 
virtual bool fillVirginHttpHeader (MemBuf &) const
 
void setOutcome (const XactOutcome &xo)
 
void tellQueryAborted (bool final)
 
void sendAnswer (const Answer &answer)
 
void clearInitiator ()
 
void deleteThis (const char *aReason)
 
void mustStop (const char *aReason)
 
bool done () const
 the job is destroyed in callEnd() when done() More...
 

Protected Attributes

Comm::ConnectionPointer connection
 ICAP server connection. More...
 
Adaptation::Icap::ServiceRep::Pointer theService
 
SBuf readBuf
 
bool commEof
 
bool reuseConnection
 
bool isRetriable
 can retry on persistent connection failures More...
 
bool isRepeatable
 can repeat if no or unsatisfactory response More...
 
bool ignoreLastWrite
 
const char * stopReason
 
AsyncCall::Pointer connector
 
AsyncCall::Pointer reader
 
AsyncCall::Pointer writer
 
AsyncCall::Pointer closer
 
AccessLogEntry::Pointer alep
 icap.log entry More...
 
AccessLogEntryal
 short for *alep More...
 
timeval icap_tr_start
 
timeval icap_tio_start
 
timeval icap_tio_finish
 
CbcPointer< InitiatortheInitiator
 
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 Member Functions

 CBDATA_CLASS (OptXact)
 
virtual void finalizeLogInfo ()
 

Private Attributes

bool readAll
 read the entire OPTIONS response More...
 

Detailed Description

Definition at line 25 of file OptXact.h.

Member Typedef Documentation

◆ Pointer

Definition at line 34 of file AsyncJob.h.

Constructor & Destructor Documentation

◆ OptXact()

Adaptation::Icap::OptXact::OptXact ( ServiceRep::Pointer aService)

Definition at line 26 of file OptXact.cc.

Member Function Documentation

◆ callEnd()

void Adaptation::Icap::Xaction::callEnd ( )
virtualinherited

◆ callException()

void Adaptation::Icap::Xaction::callException ( const std::exception &  e)
virtualinherited

◆ callStart()

void AsyncJob::callStart ( AsyncCall call)
inherited

◆ canBeCalled()

bool AsyncJob::canBeCalled ( AsyncCall call) const
inherited

Definition at line 101 of file AsyncJob.cc.

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

Referenced by AsyncJob::swanSong().

◆ cancelRead()

◆ CBDATA_CLASS()

Adaptation::Icap::OptXact::CBDATA_CLASS ( OptXact  )
private

◆ clearError()

◆ clearInitiator()

◆ closeConnection()

◆ deleteThis()

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

◆ detailError()

◆ dieOnConnectionFailure()

◆ disableRepeats()

◆ disableRetries()

◆ dnsLookupDone()

◆ done()

◆ doneAll()

bool Adaptation::Icap::Xaction::doneAll ( ) const
protectedvirtualinherited

◆ doneReading()

virtual bool Adaptation::Icap::OptXact::doneReading ( ) const
inlineprotectedvirtual

Reimplemented from Adaptation::Icap::Xaction.

Definition at line 42 of file OptXact.h.

References Adaptation::Icap::Xaction::commEof, finalizeLogInfo(), readAll, and swanSong().

◆ doneWithIo()

◆ doneWriting()

bool Adaptation::Icap::Xaction::doneWriting ( ) const
protectedvirtualinherited

◆ fillDoneStatus()

◆ fillPendingStatus()

◆ fillVirginHttpHeader()

bool Adaptation::Icap::Xaction::fillVirginHttpHeader ( MemBuf ) const
protectedvirtualinherited

Reimplemented in Adaptation::Icap::ModXact.

Definition at line 701 of file Xaction.cc.

Referenced by Adaptation::Icap::Xaction::detailError().

◆ finalizeLogInfo()

◆ handleCommClosed()

void Adaptation::Icap::Xaction::handleCommClosed ( )
protectedvirtualinherited

◆ handleCommConnected()

◆ handleCommRead()

◆ handleCommTimedout()

◆ handleCommWrote()

void Adaptation::Icap::OptXact::handleCommWrote ( size_t  size)
protectedvirtual

Implements Adaptation::Icap::Xaction.

Definition at line 76 of file OptXact.cc.

References debugs, HERE(), and Adaptation::Icap::Xaction::status().

◆ handleSecuredPeer()

◆ haveConnection()

◆ initiator()

void Adaptation::Initiate::initiator ( const CbcPointer< Initiator > &  i)
inherited

◆ makeRequest()

◆ masterLogEntry()

AccessLogEntry::Pointer Adaptation::Icap::Xaction::masterLogEntry ( )
virtualinherited

◆ mayReadMore()

◆ mustStop()

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

Definition at line 69 of file AsyncJob.cc.

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().

◆ noteCommClosed()

◆ noteCommConnected()

◆ noteCommRead()

◆ noteCommTimedout()

void Adaptation::Icap::Xaction::noteCommTimedout ( const CommTimeoutCbParams io)
inherited

◆ noteCommWrote()

◆ noteInitiatorAborted()

◆ openConnection()

◆ parseHttpMsg()

◆ parseResponse()

◆ repeatable()

◆ retriable()

bool Adaptation::Icap::Xaction::retriable ( ) const
inlineinherited

◆ scheduleRead()

◆ scheduleWrite()

◆ sendAnswer()

◆ service()

◆ setOutcome()

◆ start()

void Adaptation::Icap::OptXact::start ( )
protectedvirtual

◆ Start()

◆ startReading()

void Adaptation::Icap::OptXact::startReading ( )
protected

◆ status()

◆ swanSong()

void Adaptation::Icap::OptXact::swanSong ( )
protectedvirtual

Reimplemented from Adaptation::Icap::Xaction.

Definition at line 122 of file OptXact.cc.

References Adaptation::Icap::Xaction::swanSong().

Referenced by doneReading().

◆ tellQueryAborted()

◆ toCbdata()

virtual void* CbdataParent::toCbdata ( )
pure virtualinherited

◆ updateTimeout()

Member Data Documentation

◆ al

◆ alep

AccessLogEntry::Pointer Adaptation::Icap::Xaction::alep
protectedinherited

◆ attempts

int Adaptation::Icap::Xaction::attempts
inherited

◆ closer

◆ commEof

◆ connection

◆ connector

◆ icap_tio_finish

timeval Adaptation::Icap::Xaction::icap_tio_finish
protectedinherited

◆ icap_tio_start

timeval Adaptation::Icap::Xaction::icap_tio_start
protectedinherited

◆ icap_tr_start

timeval Adaptation::Icap::Xaction::icap_tr_start
protectedinherited

◆ icapReply

◆ icapRequest

◆ id

const InstanceId<AsyncJob> AsyncJob::id
protectedinherited

Definition at line 72 of file AsyncJob.h.

◆ ignoreLastWrite

bool Adaptation::Icap::Xaction::ignoreLastWrite
protectedinherited

◆ inCall

◆ isRepeatable

bool Adaptation::Icap::Xaction::isRepeatable
protectedinherited

◆ isRetriable

◆ readAll

bool Adaptation::Icap::OptXact::readAll
private

Definition at line 49 of file OptXact.h.

Referenced by doneReading(), and handleCommRead().

◆ readBuf

◆ reader

◆ reuseConnection

◆ stopReason

const char* Adaptation::Icap::Xaction::stopReason
protectedinherited

Definition at line 140 of file Xaction.h.

Referenced by Adaptation::Icap::Xaction::fillDoneStatus().

◆ theInitiator

◆ theService

◆ typeName

◆ writer


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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors