#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)
 
 ~Launcher () override
 
void noteInitiatorAborted () override
 
void noteAdaptationAnswer (const Answer &answer) override
 
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...
 
void handleStopRequest ()
 process external request to terminate now (i.e. during this async call) More...
 
virtual void * toCbdata ()=0
 
virtual void noteAdaptationAclCheckDone (Adaptation::ServiceGroupPointer group)
 

Static Public Member Functions

static void Start (const Pointer &job)
 
static void RegisterWithCacheManager ()
 

Public Attributes

const InstanceId< AsyncJobid
 job identifier More...
 

Protected Member Functions

void start () override
 called by AsyncStart; do not call directly More...
 
bool doneAll () const override
 whether positive goal has been reached More...
 
void swanSong () override
 
virtual XactioncreateXaction ()=0
 
void launchXaction (const char *xkind)
 
void sendAnswer (const Answer &answer)
 
void tellQueryAborted (bool final)
 
void clearInitiator ()
 
const char * status () const override
 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...
 

Static Protected Member Functions

static void ReportAllJobs (StoreEntry *)
 writes a cache manager report about all jobs existing in this worker 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...
 
bool started_ = false
 Start() has finished successfully. More...
 
bool swanSang_ = false
 swanSong() was called More...
 

Private Member Functions

bool canRetry (XactAbortInfo &info) const
 
bool canRepeat (XactAbortInfo &info) const
 
virtual void finalizedInCbdataChild ()=0
 hack: ensure CBDATA_CHILD() after a toCbdata()-defining CBDATA_INTERMEDIATE() More...
 

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

Definition at line 30 of file Launcher.cc.

References assert.

Member Function Documentation

◆ announceInitiatorAbort()

void Adaptation::Initiator::announceInitiatorAbort ( CbcPointer< Initiate > &  x)
protectedinherited

Definition at line 38 of file Initiator.cc.

References CallJobHere.

Referenced by ClientHttpRequest::~ClientHttpRequest(), and Client::cleanAdaptation().

◆ callEnd()

void AsyncJob::callEnd ( )
virtualinherited

◆ callException()

◆ callStart()

void AsyncJob::callStart ( AsyncCall call)
inherited

◆ canBeCalled()

bool AsyncJob::canBeCalled ( AsyncCall call) const
inherited

Definition at line 117 of file AsyncJob.cc.

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

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

◆ clearAdaptation()

void Adaptation::Initiator::clearAdaptation ( CbcPointer< Initiate > &  x)
protectedinherited

◆ clearInitiator()

void Adaptation::Initiate::clearInitiator ( )
protectedinherited

Definition at line 74 of file Initiate.cc.

◆ createXaction()

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

◆ deleteThis()

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

◆ done()

bool AsyncJob::done ( ) const
protectedinherited

◆ doneAll()

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

Reimplemented from AsyncJob.

Definition at line 100 of file Launcher.cc.

References AsyncJob::doneAll().

◆ finalizedInCbdataChild()

virtual void CbdataParent::finalizedInCbdataChild ( )
privatepure virtualinherited

◆ handleStopRequest()

void AsyncJob::handleStopRequest ( )
inlineinherited

Definition at line 73 of file AsyncJob.h.

References AsyncJob::mustStop().

◆ initiateAdaptation()

CbcPointer< Adaptation::Initiate > Adaptation::Initiator::initiateAdaptation ( Initiate x)
protectedinherited

◆ initiated()

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

Definition at line 52 of file Initiator.h.

References CbcPointer< Cbc >::set().

Referenced by ClientHttpRequest::startAdaptation(), and Client::startAdaptation().

◆ initiator()

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

Definition at line 54 of file Initiate.cc.

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

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

◆ launchXaction()

◆ mustStop()

◆ 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 Client, and ClientHttpRequest.

Definition at line 17 of file Initiator.cc.

References Must.

◆ noteAdaptationAnswer()

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

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, debugs, Adaptation::Answer::kind, and Must.

◆ noteInitiatorAborted()

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

Implements Adaptation::Initiate.

Definition at line 72 of file Launcher.cc.

References Must.

◆ noteXactAbort()

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

Definition at line 81 of file Launcher.cc.

References debugs, and Must.

◆ RegisterWithCacheManager()

void AsyncJob::RegisterWithCacheManager ( )
staticinherited

Definition at line 215 of file AsyncJob.cc.

References Mgr::RegisterAction(), and AsyncJob::ReportAllJobs().

Referenced by mainInitialize().

◆ ReportAllJobs()

void AsyncJob::ReportAllJobs ( StoreEntry e)
staticprotectedinherited

Definition at line 198 of file AsyncJob.cc.

References AllJobs().

Referenced by AsyncJob::RegisterWithCacheManager().

◆ sendAnswer()

void Adaptation::Initiate::sendAnswer ( const Answer answer)
protectedinherited

Definition at line 79 of file Initiate.cc.

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

◆ start()

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

Reimplemented from AsyncJob.

Definition at line 35 of file Launcher.cc.

References Must, and AsyncJob::start().

◆ Start()

◆ status()

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

for debugging, starts with space

Reimplemented from AsyncJob.

Definition at line 92 of file Initiate.cc.

References AsyncJob::status().

◆ swanSong()

void Adaptation::Icap::Launcher::swanSong ( )
overrideprotectedvirtual

Reimplemented from AsyncJob.

Reimplemented in Adaptation::Icap::ModXactLauncher.

Definition at line 105 of file Launcher.cc.

References Adaptation::Initiate::swanSong().

Referenced by Adaptation::Icap::ModXactLauncher::swanSong().

◆ tellQueryAborted()

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

Definition at line 87 of file Initiate.cc.

References Adaptation::Answer::Error().

◆ toCbdata()

virtual void * CbdataParent::toCbdata ( )
pure virtualinherited

Member Data Documentation

◆ id

const InstanceId<AsyncJob> AsyncJob::id
inherited

Definition at line 75 of file AsyncJob.h.

◆ inCall

AsyncCall::Pointer AsyncJob::inCall
protectedinherited

◆ started_

bool AsyncJob::started_ = false
protectedinherited

Definition at line 88 of file AsyncJob.h.

Referenced by AsyncJob::~AsyncJob(), AsyncJob::callEnd(), and AsyncJob::Start().

◆ stopReason

const char* AsyncJob::stopReason
protectedinherited

◆ swanSang_

bool AsyncJob::swanSang_ = false
protectedinherited

Definition at line 89 of file AsyncJob.h.

Referenced by AsyncJob::~AsyncJob(), and AsyncJob::callEnd().

◆ theInitiator

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

Definition at line 51 of file Initiate.h.

◆ theLaunches

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

Definition at line 77 of file Launcher.h.

◆ theService

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

Definition at line 75 of file Launcher.h.

◆ theXaction

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

Definition at line 76 of file Launcher.h.

◆ typeName


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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors