#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

Definition at line 34 of file AsyncJob.h.

Constructor & Destructor Documentation

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

Definition at line 26 of file OptXact.cc.

Member Function Documentation

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

called right after the called job method

Reimplemented from AsyncJob.

Definition at line 408 of file Xaction.cc.

References AsyncJob::callEnd(), debugs, and HERE().

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

Reimplemented from AsyncJob.

Reimplemented in Adaptation::Icap::ModXact.

Definition at line 401 of file Xaction.cc.

References AsyncJob::callException(), and Adaptation::Icap::xoError.

Referenced by Adaptation::Icap::ModXact::callException().

void AsyncJob::callStart ( AsyncCall call)
inherited
bool AsyncJob::canBeCalled ( AsyncCall call) const
inherited

Definition at line 101 of file AsyncJob.cc.

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

void Adaptation::Icap::Xaction::cancelRead ( )
protectedinherited

Definition at line 513 of file Xaction.cc.

References Must, NULL, and Comm::ReadCancel().

Adaptation::Icap::OptXact::CBDATA_CLASS ( OptXact  )
private
virtual void Adaptation::Icap::Xaction::clearError ( )
inlinevirtualinherited

Reimplemented in Adaptation::Icap::ModXact.

Definition at line 113 of file Xaction.h.

Referenced by Adaptation::Icap::Launcher::launchXaction().

void Adaptation::Initiate::clearInitiator ( )
protectedinherited

Definition at line 74 of file Initiate.cc.

void Adaptation::Icap::Xaction::closeConnection ( )
protectedinherited
void AsyncJob::deleteThis ( const char *  aReason)
protectedinherited
virtual void Adaptation::Icap::Xaction::detailError ( int  )
inlineprotectedvirtualinherited

Reimplemented in Adaptation::Icap::ModXact.

Definition at line 76 of file Xaction.h.

void Adaptation::Icap::Xaction::dieOnConnectionFailure ( )
protectedinherited

Definition at line 322 of file Xaction.cc.

References debugs, ERR_DETAIL_ICAP_XACT_START, HERE(), and TexcHere.

void Adaptation::Icap::Xaction::disableRepeats ( const char *  reason)
inherited

Definition at line 136 of file Xaction.cc.

References debugs.

Referenced by Adaptation::Icap::Launcher::launchXaction().

void Adaptation::Icap::Xaction::disableRetries ( )
inherited

Definition at line 129 of file Xaction.cc.

References debugs.

Referenced by Adaptation::Icap::Launcher::launchXaction().

bool AsyncJob::done ( ) const
protectedinherited

Definition at line 90 of file AsyncJob.cc.

References AsyncJob::doneAll(), NULL, and AsyncJob::stopReason.

Referenced by AsyncJob::callEnd(), and Downloader::downloadFinished().

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

Reimplemented from AsyncJob.

Reimplemented in Adaptation::Icap::ModXact.

Definition at line 417 of file Xaction.cc.

References AsyncJob::doneAll().

Referenced by Adaptation::Icap::ModXact::doneAll().

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, and readAll.

bool Adaptation::Icap::Xaction::doneWithIo ( ) const
protectedinherited

Definition at line 559 of file Xaction.cc.

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

Reimplemented in Adaptation::Icap::ModXact.

Definition at line 554 of file Xaction.cc.

void Adaptation::Icap::Xaction::fillDoneStatus ( MemBuf buf) const
protectedvirtualinherited

Reimplemented in Adaptation::Icap::ModXact.

Definition at line 693 of file Xaction.cc.

References MemBuf::append(), Packable::appendf(), and NULL.

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

void Adaptation::Icap::Xaction::fillPendingStatus ( MemBuf buf) const
protectedvirtualinherited

Reimplemented in Adaptation::Icap::ModXact.

Definition at line 678 of file Xaction.cc.

References MemBuf::append(), Packable::appendf(), and NULL.

Referenced by Adaptation::Icap::ModXact::fillPendingStatus().

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

Reimplemented in Adaptation::Icap::ModXact.

Definition at line 702 of file Xaction.cc.

void Adaptation::Icap::OptXact::finalizeLogInfo ( )
privatevirtual
void Adaptation::Icap::Xaction::handleCommClosed ( )
protectedvirtualinherited

Definition at line 395 of file Xaction.cc.

References ERR_DETAIL_ICAP_XACT_CLOSE.

void Adaptation::Icap::OptXact::handleCommConnected ( )
protectedvirtual
void Adaptation::Icap::OptXact::handleCommRead ( size_t  size)
protectedvirtual
void Adaptation::Icap::Xaction::handleCommTimedout ( )
protectedvirtualinherited

Definition at line 367 of file Xaction.cc.

References assert, debugs, HERE(), NULL, and TexcHere.

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

Implements Adaptation::Icap::Xaction.

Definition at line 76 of file OptXact.cc.

References debugs, and HERE().

bool Adaptation::Icap::Xaction::haveConnection ( ) const
protectedinherited

Definition at line 566 of file Xaction.cc.

References NULL.

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

Definition at line 54 of file Initiate.cc.

References i, Must, and CbcPointer< Cbc >::valid().

Referenced by Adaptation::Initiator::initiateAdaptation().

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

Reimplemented in Adaptation::Icap::ModXact.

Definition at line 116 of file Xaction.cc.

bool Adaptation::Icap::Xaction::mayReadMore ( ) const
protectedinherited

Definition at line 543 of file Xaction.cc.

void Adaptation::Icap::Xaction::noteCommClosed ( const CommCloseCbParams io)
inherited

Definition at line 385 of file Xaction.cc.

References NULL.

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

void Adaptation::Icap::Xaction::noteCommTimedout ( const CommTimeoutCbParams io)
inherited
void Adaptation::Icap::Xaction::noteCommWrote ( const CommIoCbParams io)
inherited
void Adaptation::Icap::Xaction::noteInitiatorAborted ( )
protectedvirtualinherited

Implements Adaptation::Initiate.

Definition at line 572 of file Xaction.cc.

References debugs, ERR_DETAIL_ICAP_INIT_GONE, HERE(), and Adaptation::Icap::xoGone.

bool Adaptation::Icap::Xaction::parseHttpMsg ( Http::Message msg)
protectedinherited
bool Adaptation::Icap::OptXact::parseResponse ( )
protected
bool Adaptation::Icap::Xaction::repeatable ( ) const
inlineinherited

Definition at line 47 of file Xaction.h.

References Adaptation::Icap::Xaction::isRepeatable.

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

Definition at line 46 of file Xaction.h.

References Adaptation::Icap::Xaction::isRetriable.

void Adaptation::Icap::Xaction::scheduleRead ( )
protectedinherited

Definition at line 440 of file Xaction.cc.

References JobCallback, Must, Adaptation::Icap::Xaction::noteCommRead(), and Comm::Read().

void Adaptation::Icap::Xaction::scheduleWrite ( MemBuf buf)
protectedinherited
void Adaptation::Initiate::sendAnswer ( const Answer answer)
protectedinherited

Definition at line 79 of file Initiate.cc.

References Adaptation::Initiator::noteAdaptationAnswer(), and ScheduleCallHere.

Adaptation::Icap::ServiceRep & Adaptation::Icap::Xaction::service ( )
inherited

Definition at line 123 of file Xaction.cc.

References Must, and NULL.

Referenced by Adaptation::Icap::ConnWaiterDialer::ConnWaiterDialer().

void Adaptation::Icap::Xaction::setOutcome ( const XactOutcome xo)
protectedinherited

Definition at line 585 of file Xaction.cc.

References debugs, HERE(), and Adaptation::Icap::xoUnknown.

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

Reimplemented from Adaptation::Icap::Xaction.

Definition at line 33 of file OptXact.cc.

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

void Adaptation::Icap::OptXact::startReading ( )
protected
const char * Adaptation::Icap::Xaction::status ( ) const
protectedvirtualinherited

for debugging, starts with space

Reimplemented from Adaptation::Initiate.

Definition at line 664 of file Xaction.cc.

References MemBuf::append(), Packable::appendf(), buf, MemBuf::content(), MemBuf::reset(), and MemBuf::terminate().

Referenced by Adaptation::Icap::ModXact::ModXact().

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

Reimplemented from Adaptation::Icap::Xaction.

Definition at line 122 of file OptXact.cc.

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

void Adaptation::Initiate::tellQueryAborted ( bool  final)
protectedinherited

Definition at line 87 of file Initiate.cc.

References Adaptation::Answer::Error().

virtual void* CbdataParent::toCbdata ( )
pure virtualinherited
void Adaptation::Icap::Xaction::updateTimeout ( )
protectedinherited

Member Data Documentation

AccessLogEntry& Adaptation::Icap::Xaction::al
protectedinherited

Definition at line 149 of file Xaction.h.

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

Definition at line 148 of file Xaction.h.

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

Definition at line 61 of file Xaction.h.

Referenced by Adaptation::Icap::Launcher::launchXaction().

AsyncCall::Pointer Adaptation::Icap::Xaction::closer
protectedinherited

Definition at line 146 of file Xaction.h.

bool Adaptation::Icap::Xaction::commEof
protectedinherited

Definition at line 134 of file Xaction.h.

Referenced by doneReading(), and Adaptation::Icap::ModXact::doneReading().

Comm::ConnectionPointer Adaptation::Icap::Xaction::connection
protectedinherited

Definition at line 130 of file Xaction.h.

AsyncCall::Pointer Adaptation::Icap::Xaction::connector
protectedinherited

Definition at line 143 of file Xaction.h.

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

Definition at line 153 of file Xaction.h.

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

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

Definition at line 152 of file Xaction.h.

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

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

Definition at line 151 of file Xaction.h.

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

HttpReply::Pointer Adaptation::Icap::Xaction::icapReply
inherited

Definition at line 58 of file Xaction.h.

Referenced by Adaptation::Icap::ModXact::ModXact().

HttpRequest* Adaptation::Icap::Xaction::icapRequest
inherited

Definition at line 57 of file Xaction.h.

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

const InstanceId<AsyncJob> AsyncJob::id
protectedinherited

Definition at line 70 of file AsyncJob.h.

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

Definition at line 138 of file Xaction.h.

AsyncCall::Pointer AsyncJob::inCall
protectedinherited
bool Adaptation::Icap::Xaction::isRepeatable
protectedinherited

Definition at line 137 of file Xaction.h.

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

bool Adaptation::Icap::Xaction::isRetriable
protectedinherited

Definition at line 136 of file Xaction.h.

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

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

Definition at line 49 of file OptXact.h.

Referenced by doneReading().

SBuf Adaptation::Icap::Xaction::readBuf
protectedinherited

Definition at line 133 of file Xaction.h.

AsyncCall::Pointer Adaptation::Icap::Xaction::reader
protectedinherited

Definition at line 144 of file Xaction.h.

bool Adaptation::Icap::Xaction::reuseConnection
protectedinherited

Definition at line 135 of file Xaction.h.

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

Definition at line 140 of file Xaction.h.

CbcPointer<Initiator> Adaptation::Initiate::theInitiator
protectedinherited

Definition at line 51 of file Initiate.h.

Adaptation::Icap::ServiceRep::Pointer Adaptation::Icap::Xaction::theService
protectedinherited

Definition at line 131 of file Xaction.h.

AsyncCall::Pointer Adaptation::Icap::Xaction::writer
protectedinherited

Definition at line 145 of file Xaction.h.


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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors