#include <AccessCheck.h>

Inheritance diagram for Adaptation::AccessCheck:
Collaboration diagram for Adaptation::AccessCheck:

Public Types

typedef void AccessCheckCallback(ServiceGroupPointer group, void *data)
typedef CbcPointer< AsyncJobPointer

Public Member Functions

void checkCandidates ()
void noteAnswer (Acl::Answer answer)
 process the results of the ACL check 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

Static Public Member Functions

static bool Start (Method method, VectPoint vp, HttpRequest *req, HttpReply *, const AccessLogEntryPointer &, Adaptation::Initiator *)
static void AccessCheckCallbackWrapper (Acl::Answer, void *)
static void Start (const Pointer &job)

Public Attributes

const InstanceId< AsyncJobid
 job identifier More...

Protected Member Functions

 AccessCheck (const ServiceFilter &aFilter, Adaptation::Initiator *)
 ~AccessCheck ()
virtual void start ()
 called by AsyncStart; do not call directly More...
virtual bool doneAll () const
 whether positive goal has been reached More...
bool usedDynamicRules ()
 not done until mustStop More...
void check ()
 Walk the access rules list to find rules with applicable service groups. More...
void deleteThis (const char *aReason)
void mustStop (const char *aReason)
bool done () const
 the job is destroyed in callEnd() when done() More...
virtual void swanSong ()
virtual const char * status () const
 internal cleanup; do not call directly More...

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

Private Types

typedef int Candidate
typedef std::vector< CandidateCandidates

Private Member Functions

 CBDATA_CLASS (AccessCheck)
Candidate topCandidate () const
ServiceGroupPointer topGroup () const
void callBack (const ServiceGroupPointer &g)
bool isCandidate (AccessRule &r)

Private Attributes

const ServiceFilter filter
CbcPointer< Adaptation::InitiatortheInitiator
 the job which ordered this access check More...
Candidates candidates

Detailed Description

Definition at line 30 of file AccessCheck.h.

Member Typedef Documentation

◆ AccessCheckCallback

typedef void Adaptation::AccessCheck::AccessCheckCallback(ServiceGroupPointer group, void *data)

Definition at line 35 of file AccessCheck.h.

◆ Candidate

Definition at line 51 of file AccessCheck.h.

◆ Candidates

Definition at line 52 of file AccessCheck.h.

◆ Pointer

Definition at line 34 of file AsyncJob.h.

Constructor & Destructor Documentation

◆ AccessCheck()

Adaptation::AccessCheck::AccessCheck ( const ServiceFilter aFilter,
Adaptation::Initiator initiator 

◆ ~AccessCheck()

Adaptation::AccessCheck::~AccessCheck ( )

Definition at line 62 of file AccessCheck.cc.

References NULL.

Member Function Documentation

◆ AccessCheckCallbackWrapper()

void Adaptation::AccessCheck::AccessCheckCallbackWrapper ( Acl::Answer  answer,
void *  data 

Definition at line 152 of file AccessCheck.cc.

References asyncCall(), debugs, HERE(), noteAnswer(), and ScheduleCallHere.

◆ callBack()

void Adaptation::AccessCheck::callBack ( const ServiceGroupPointer g)

call back with a possibly nil group; the job ends here because all failures at this point are fatal to the access check process

Definition at line 195 of file AccessCheck.cc.

References CallJobHere1, debugs, and HERE().

◆ callEnd()

void AsyncJob::callEnd ( )

◆ callException()

◆ callStart()

void AsyncJob::callStart ( AsyncCall call)

◆ canBeCalled()

bool AsyncJob::canBeCalled ( AsyncCall call) const

Definition at line 102 of file AsyncJob.cc.

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


Adaptation::AccessCheck::CBDATA_CLASS ( AccessCheck  )

◆ check()

void Adaptation::AccessCheck::check ( )

Definition at line 104 of file AccessCheck.cc.

References Adaptation::AllRules(), debugs, HERE(), and Adaptation::AccessRule::id.

◆ checkCandidates()

void Adaptation::AccessCheck::checkCandidates ( )

Definition at line 126 of file AccessCheck.cc.

References dash_str, debugs, Adaptation::FindRule(), HERE(), HTTPMSGLOCK(), Must, and NULL.

◆ deleteThis()

void AsyncJob::deleteThis ( const char *  aReason)

◆ done()

bool AsyncJob::done ( ) const

◆ doneAll()

virtual bool Adaptation::AccessCheck::doneAll ( ) const

Reimplemented from AsyncJob.

Definition at line 68 of file AccessCheck.h.

◆ handleStopRequest()

void AsyncJob::handleStopRequest ( )

Definition at line 71 of file AsyncJob.h.

References AsyncJob::mustStop().

◆ isCandidate()

bool Adaptation::AccessCheck::isCandidate ( AccessRule r)

Returns true iff the rule's service group will be used after ACL matches. Used to detect rules worth ACl-checking.

Definition at line 224 of file AccessCheck.cc.

References debugs, Adaptation::FindGroup(), Adaptation::AccessRule::groupId, HERE(), Adaptation::AccessRule::id, and Adaptation::ServiceGroup::wants().

◆ mustStop()

◆ noteAnswer()

void Adaptation::AccessCheck::noteAnswer ( Acl::Answer  answer)

Definition at line 173 of file AccessCheck.cc.

References Acl::Answer::allowed(), debugs, HERE(), Must, and NULL.

Referenced by AccessCheckCallbackWrapper().

◆ start()

void Adaptation::AccessCheck::start ( )

Reimplemented from AsyncJob.

Definition at line 72 of file AccessCheck.cc.

References AsyncJob::start().

◆ Start() [1/2]

◆ Start() [2/2]

bool Adaptation::AccessCheck::Start ( Method  method,
VectPoint  vp,
HttpRequest req,
HttpReply rep,
const AccessLogEntryPointer al,
Adaptation::Initiator initiator 

◆ status()

◆ swanSong()

◆ toCbdata()

virtual void* CbdataParent::toCbdata ( )
pure virtualinherited

◆ topCandidate()

Candidate Adaptation::AccessCheck::topCandidate ( ) const

Definition at line 54 of file AccessCheck.h.

References candidates.

◆ topGroup()

Adaptation::ServiceGroupPointer Adaptation::AccessCheck::topGroup ( ) const

Definition at line 204 of file AccessCheck.cc.

References debugs, Adaptation::FindGroup(), Adaptation::FindRule(), and HERE().

◆ usedDynamicRules()

bool Adaptation::AccessCheck::usedDynamicRules ( )

returns true if previous services configured dynamic chaining "rules"

Definition at line 82 of file AccessCheck.cc.

References debugs, Adaptation::History::extractFutureServices(), HERE(), and Must.

Member Data Documentation

◆ acl_checklist

ACLFilledChecklist* Adaptation::AccessCheck::acl_checklist

Definition at line 49 of file AccessCheck.h.

◆ candidates

Candidates Adaptation::AccessCheck::candidates

Definition at line 53 of file AccessCheck.h.

Referenced by topCandidate().

◆ filter

const ServiceFilter Adaptation::AccessCheck::filter

Definition at line 47 of file AccessCheck.h.

Referenced by AccessCheck().

◆ id

const InstanceId<AsyncJob> AsyncJob::id

Definition at line 73 of file AsyncJob.h.

◆ inCall

AsyncCall::Pointer AsyncJob::inCall

◆ started_

bool AsyncJob::started_ = false

Definition at line 83 of file AsyncJob.h.

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

◆ stopReason

const char* AsyncJob::stopReason

◆ swanSang_

bool AsyncJob::swanSang_ = false

Definition at line 84 of file AsyncJob.h.

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

◆ theInitiator

CbcPointer<Adaptation::Initiator> Adaptation::AccessCheck::theInitiator

Definition at line 48 of file AccessCheck.h.

◆ typeName

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






Web Site Translations