#include <Launcher.h>

Inheritance diagram for Adaptation::Icap::Launcher:
Collaboration diagram for Adaptation::Icap::Launcher:

Public Types

typedef CbcPointer< AsyncJobPointer
 

Public Member Functions

 Launcher (const char *aTypeName, Adaptation::ServicePointer &aService)
 
virtual ~Launcher ()
 
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 void start ()
 called by AsyncStart; do not call directly More...
 
virtual bool doneAll () const
 whether positive goal has been reached More...
 
virtual void swanSong ()
 
virtual XactioncreateXaction ()=0
 
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

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

bool canRetry (XactAbortInfo &info) const
 
bool canRepeat (XactAbortInfo &info) const
 

Detailed Description

Definition at line 47 of file Launcher.h.

Member Typedef Documentation

◆ Pointer

Definition at line 34 of file AsyncJob.h.

Constructor & Destructor Documentation

◆ Launcher()

Adaptation::Icap::Launcher::Launcher ( const char *  aTypeName,
Adaptation::ServicePointer aService 
)

Definition at line 22 of file Launcher.cc.

◆ ~Launcher()

Adaptation::Icap::Launcher::~Launcher ( )
virtual

Definition at line 30 of file Launcher.cc.

References assert, and theXaction.

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

◆ canRepeat()

◆ canRetry()

bool Adaptation::Icap::Launcher::canRetry ( XactAbortInfo info) const
private

Definition at line 116 of file Launcher.cc.

References Adaptation::Icap::XactAbortInfo::isRetriable, and shutting_down.

Referenced by noteXactAbort().

◆ clearAdaptation()

◆ clearInitiator()

◆ createXaction()

virtual Xaction* Adaptation::Icap::Launcher::createXaction ( )
protectedpure virtual

◆ deleteThis()

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

◆ done()

◆ doneAll()

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

Reimplemented from AsyncJob.

Definition at line 100 of file Launcher.cc.

References AsyncJob::doneAll(), Adaptation::Initiate::theInitiator, and theXaction.

◆ initiateAdaptation()

◆ initiated()

bool Adaptation::Initiator::initiated ( const CbcPointer< AsyncJob > &  job) const
inlineprotectedinherited

◆ 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)
virtual

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(), theLaunches, and theXaction.

◆ noteInitiatorAborted()

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

◆ noteXactAbort()

void Adaptation::Icap::Launcher::noteXactAbort ( XactAbortInfo  info)
virtual

◆ sendAnswer()

◆ Start()

◆ start()

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

Reimplemented from AsyncJob.

Definition at line 35 of file Launcher.cc.

References launchXaction(), Must, CbcPointer< Cbc >::set(), AsyncJob::start(), and Adaptation::Initiate::theInitiator.

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

◆ tellQueryAborted()

◆ toCbdata()

virtual void* CbdataParent::toCbdata ( )
pure virtualinherited

Member Data Documentation

◆ id

const InstanceId<AsyncJob> AsyncJob::id
protectedinherited

Definition at line 72 of file AsyncJob.h.

◆ inCall

◆ stopReason

const char* AsyncJob::stopReason
protectedinherited

◆ theInitiator

◆ theLaunches

int Adaptation::Icap::Launcher::theLaunches
protected

Definition at line 77 of file Launcher.h.

Referenced by canRepeat(), launchXaction(), noteAdaptationAnswer(), and noteXactAbort().

◆ theService

Adaptation::ServicePointer Adaptation::Icap::Launcher::theService
protected

◆ theXaction

CbcPointer<Initiate> Adaptation::Icap::Launcher::theXaction
protected

◆ typeName


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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors