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

XactioncreateXaction () override
 
void swanSong () override
 
void updateHistory (bool start)
 starts or stops transaction accounting in ICAP history More...
 
void start () override
 called by AsyncStart; do not call directly More...
 
bool doneAll () const override
 whether positive goal has been reached More...
 
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

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...
 
bool started_ = false
 Start() has finished successfully. More...
 
bool swanSang_ = false
 swanSong() was called More...
 

Private Member Functions

 CBDATA_CHILD (ModXactLauncher)
 
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 378 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()

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
privateinherited

Definition at line 116 of file Launcher.cc.

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

◆ CBDATA_CHILD()

Adaptation::Icap::ModXactLauncher::CBDATA_CHILD ( ModXactLauncher  )
private

◆ clearAdaptation()

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

◆ clearInitiator()

void Adaptation::Initiate::clearInitiator ( )
protectedinherited

Definition at line 74 of file Initiate.cc.

◆ createXaction()

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

Implements Adaptation::Icap::Launcher.

Definition at line 2036 of file ModXact.cc.

References Must.

◆ deleteThis()

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

◆ done()

bool AsyncJob::done ( ) const
protectedinherited

◆ doneAll()

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

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)
overridevirtualinherited

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

Implements Adaptation::Initiate.

Definition at line 72 of file Launcher.cc.

References Must.

◆ noteXactAbort()

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

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

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::ModXactLauncher::swanSong ( )
overrideprotectedvirtual

Reimplemented from Adaptation::Icap::Launcher.

Definition at line 2044 of file ModXact.cc.

References debugs, and Adaptation::Icap::Launcher::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

◆ updateHistory()

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

Member Data Documentation

◆ al

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

Definition at line 395 of file ModXact.h.

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

Definition at line 77 of file Launcher.h.

◆ theService

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

Definition at line 75 of file Launcher.h.

◆ theXaction

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

Definition at line 76 of file Launcher.h.

◆ typeName

◆ virgin

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

Definition at line 393 of file ModXact.h.

Referenced by ModXactLauncher().


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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors