#include <AsyncJob.h>

Inheritance diagram for AsyncJob:
Collaboration diagram for AsyncJob:

Public Types

typedef CbcPointer< AsyncJobPointer

Public Member Functions

 AsyncJob (const char *aTypeName)
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

Static Public Member Functions

static Pointer Start (AsyncJob *job)
 starts a freshly created job (i.e., makes the job asynchronous) More...

Protected Member Functions

void deleteThis (const char *aReason)
void mustStop (const char *aReason)
bool done () const
 the job is destroyed in callEnd() when done() More...
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 const char * status () const
 internal cleanup; do not call directly More...
virtual ~AsyncJob ()

Protected Attributes

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

Detailed Description

Base class for all asynchronous jobs

Definition at line 31 of file AsyncJob.h.

Member Typedef Documentation

Definition at line 34 of file AsyncJob.h.

Constructor & Destructor Documentation

AsyncJob::AsyncJob ( const char *  aTypeName)

Definition at line 30 of file AsyncJob.cc.

References debugs, and typeName.

AsyncJob::~AsyncJob ( )

Definition at line 37 of file AsyncJob.cc.

References debugs, and typeName.

Member Function Documentation

void AsyncJob::callEnd ( )

called right after the called job method

Reimplemented in Adaptation::Icap::Xaction.

Definition at line 136 of file AsyncJob.cc.

References AsyncCall::debugLevel, debugs, AsyncCall::debugSection, done(), HERE(), inCall, NULL, status(), swanSong(), and typeName.

Referenced by Adaptation::Icap::Xaction::callEnd(), and deleteThis().

void AsyncJob::callStart ( AsyncCall call)

called just before the called method

Definition at line 114 of file AsyncJob.cc.

References cbdataReferenceValid(), AsyncCall::debugLevel, debugs, AsyncCall::debugSection, inCall, Must, status(), CbdataParent::toCbdata(), and typeName.

bool AsyncJob::canBeCalled ( AsyncCall call) const

Definition at line 101 of file AsyncJob.cc.

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

void AsyncJob::deleteThis ( const char *  aReason)

Definition at line 49 of file AsyncJob.cc.

References asyncCall(), callEnd(), debugs, inCall, JobMemFun(), Must, NULL, stopReason, and typeName.

Referenced by ConnStateData::connStateClosed().

bool AsyncJob::done ( ) const

Definition at line 90 of file AsyncJob.cc.

References doneAll(), NULL, and stopReason.

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

virtual void* CbdataParent::toCbdata ( )
pure virtualinherited

Implemented in ClientHttpRequest, HttpStateData, and BodySink.

Referenced by callException(), and callStart().

Member Data Documentation

const InstanceId<AsyncJob> AsyncJob::id

Definition at line 72 of file AsyncJob.h.

AsyncCall::Pointer AsyncJob::inCall

Definition at line 71 of file AsyncJob.h.

Referenced by callEnd(), callStart(), canBeCalled(), deleteThis(), and mustStop().

const char* AsyncJob::stopReason

Definition at line 69 of file AsyncJob.h.

Referenced by deleteThis(), done(), mustStop(), and status().

const char* AsyncJob::typeName

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






Web Site Translations