#include <ModXact.h>

Inheritance diagram for Adaptation::Icap::ModXactLauncher:
Collaboration diagram for Adaptation::Icap::ModXactLauncher:

Public Types

typedef CbcPointer< AsyncJobPointer
 

Public Member Functions

 ModXactLauncher (Http::Message *virginHeader, HttpRequest *virginCause, AccessLogEntry::Pointer &alp, Adaptation::ServicePointer s)
 
void noteInitiatorAborted ()
 
virtual void noteAdaptationAnswer (const Answer &answer)
 
virtual void noteXactAbort (XactAbortInfo info)
 
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 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
 
virtual void noteAdaptationAclCheckDone (Adaptation::ServiceGroupPointer group)
 

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 XactioncreateXaction ()
 
virtual void swanSong ()
 
void updateHistory (bool start)
 starts or stops transaction accounting in ICAP history More...
 
virtual void start ()
 called by AsyncStart; do not call directly More...
 
virtual bool doneAll () const
 whether positive goal has been reached More...
 
void launchXaction (const char *xkind)
 
void sendAnswer (const Answer &answer)
 
void tellQueryAborted (bool final)
 
void clearInitiator ()
 
virtual const char * status () const
 internal cleanup; do not call directly More...
 
void deleteThis (const char *aReason)
 
void mustStop (const char *aReason)
 
bool done () const
 the job is destroyed in callEnd() when done() More...
 
CbcPointer< InitiateinitiateAdaptation (Initiate *x)
 < starts freshly created initiate and returns a safe pointer to it More...
 
void clearAdaptation (CbcPointer< Initiate > &x)
 clears the pointer (does not call announceInitiatorAbort) More...
 
void announceInitiatorAbort (CbcPointer< Initiate > &x)
 inform the transaction about abnormal termination and clear the pointer More...
 
bool initiated (const CbcPointer< AsyncJob > &job) const
 Must(initiated(initiate)) instead of Must(initiate.set()), for clarity. More...
 

Protected Attributes

InOut virgin
 
AccessLogEntry::Pointer al
 
Adaptation::ServicePointer theService
 ICAP service for all launches. More...
 
CbcPointer< InitiatetheXaction
 current ICAP transaction More...
 
int theLaunches
 
CbcPointer< InitiatortheInitiator
 
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< AsyncJobid
 job identifier More...
 

Private Member Functions

 CBDATA_CLASS (ModXactLauncher)
 

Detailed Description

Definition at line 377 of file ModXact.h.

Member Typedef Documentation

◆ Pointer

Definition at line 34 of file AsyncJob.h.

Constructor & Destructor Documentation

◆ ModXactLauncher()

Adaptation::Icap::ModXactLauncher::ModXactLauncher ( Http::Message virginHeader,
HttpRequest virginCause,
AccessLogEntry::Pointer alp,
Adaptation::ServicePointer  s 
)

Member Function Documentation

◆ announceInitiatorAbort()

◆ callEnd()

void AsyncJob::callEnd ( )
virtualinherited

◆ callException()

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

◆ CBDATA_CLASS()

Adaptation::Icap::ModXactLauncher::CBDATA_CLASS ( ModXactLauncher  )
private

◆ clearAdaptation()

◆ clearInitiator()

◆ createXaction()

Adaptation::Icap::Xaction * Adaptation::Icap::ModXactLauncher::createXaction ( )
protectedvirtual

◆ deleteThis()

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

◆ done()

◆ doneAll()

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

◆ initiateAdaptation()

◆ initiated()

◆ initiator()

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

◆ launchXaction()

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

◆ noteAdaptationAclCheckDone()

void Adaptation::Initiator::noteAdaptationAclCheckDone ( Adaptation::ServiceGroupPointer  group)
virtualinherited

AccessCheck calls this back with a possibly nil service group to signal whether adaptation is needed and where it should start.

Reimplemented in ClientHttpRequest, and Client.

Definition at line 17 of file Initiator.cc.

References Must.

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

◆ noteAdaptationAnswer()

void Adaptation::Icap::Launcher::noteAdaptationAnswer ( const Answer answer)
virtualinherited

called with the initial adaptation decision (adapt, block, error); virgin and/or adapted body transmission may continue after this

Implements Adaptation::Initiator.

Definition at line 60 of file Launcher.cc.

References Adaptation::Answer::akError, Adaptation::Initiator::clearAdaptation(), debugs, AsyncJob::done(), HERE(), Adaptation::Answer::kind, Must, Adaptation::Initiate::sendAnswer(), Adaptation::Icap::Launcher::theLaunches, and Adaptation::Icap::Launcher::theXaction.

◆ noteInitiatorAborted()

void Adaptation::Icap::Launcher::noteInitiatorAborted ( )
virtualinherited

◆ noteXactAbort()

◆ sendAnswer()

◆ Start()

◆ start()

void Adaptation::Icap::Launcher::start ( )
protectedvirtualinherited

◆ status()

const char * Adaptation::Initiate::status ( ) const
protectedvirtualinherited

for debugging, starts with space

Reimplemented from AsyncJob.

Reimplemented in Adaptation::Icap::Xaction, and Adaptation::Ecap::XactionRep.

Definition at line 92 of file Initiate.cc.

References AsyncJob::status().

Referenced by Adaptation::Initiate::swanSong().

◆ swanSong()

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

Reimplemented from Adaptation::Icap::Launcher.

Definition at line 2046 of file ModXact.cc.

References debugs, HERE(), Adaptation::Icap::Launcher::swanSong(), and updateHistory().

◆ tellQueryAborted()

◆ toCbdata()

virtual void* CbdataParent::toCbdata ( )
pure virtualinherited

◆ updateHistory()

void Adaptation::Icap::ModXactLauncher::updateHistory ( bool  start)
protected

Member Data Documentation

◆ al

AccessLogEntry::Pointer Adaptation::Icap::ModXactLauncher::al
protected

Definition at line 394 of file ModXact.h.

Referenced by createXaction().

◆ id

const InstanceId<AsyncJob> AsyncJob::id
protectedinherited

Definition at line 72 of file AsyncJob.h.

◆ inCall

◆ stopReason

const char* AsyncJob::stopReason
protectedinherited

◆ theInitiator

◆ theLaunches

◆ theService

Adaptation::ServicePointer Adaptation::Icap::Launcher::theService
protectedinherited

Definition at line 75 of file Launcher.h.

Referenced by Adaptation::Icap::OptXactLauncher::createXaction(), and createXaction().

◆ theXaction

◆ typeName

◆ virgin

InOut Adaptation::Icap::ModXactLauncher::virgin
protected

Definition at line 392 of file ModXact.h.

Referenced by createXaction(), ModXactLauncher(), and updateHistory().


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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors