Squid Web Cache master
Loading...
Searching...
No Matches
Adaptation::Answer Class Reference

summarizes adaptation service answer for the noteAdaptationAnswer() API More...

#include <Answer.h>

Collaboration diagram for Adaptation::Answer:
[legend]

Public Types

enum  Kind { akForward , akBlock , akError }
 helps interpret other members without a class hierarchy More...
 

Public Member Functions

Acl::Answer blockedToChecklistAnswer () const
 creates an Acl::Answer from akBlock answer
 
std::ostream & print (std::ostream &os) const
 

Static Public Member Functions

static Answer Error (bool final)
 create an akError answer
 
static Answer Forward (Http::Message *aMsg)
 create an akForward answer
 
static Answer Block (const SBuf &aRule)
 create an akBlock answer
 

Public Attributes

Http::MessagePointer message
 HTTP request or response to forward.
 
std::optional< SBufruleId
 ACL (or similar rule) name that blocked forwarding.
 
bool final
 whether the error, if any, cannot be bypassed
 
Kind kind
 the type of the answer
 

Private Member Functions

 Answer (Kind aKind)
 use static creators instead
 

Detailed Description

Definition at line 24 of file Answer.h.

Member Enumeration Documentation

◆ Kind

Enumerator
akForward 

forward the supplied adapted HTTP message

akBlock 

block or deny the master xaction; see authority

akError 

no adapted message will come; see bypassable

Definition at line 28 of file Answer.h.

Constructor & Destructor Documentation

◆ Answer()

Adaptation::Answer::Answer ( Kind  aKind)
explicitprivate

Definition at line 58 of file Answer.cc.

Member Function Documentation

◆ Block()

Adaptation::Answer Adaptation::Answer::Block ( const SBuf aRule)
static

Definition at line 35 of file Answer.cc.

References debugs, and ruleId.

Referenced by Adaptation::Ecap::XactionRep::blockVirgin().

◆ blockedToChecklistAnswer()

Acl::Answer Adaptation::Answer::blockedToChecklistAnswer ( ) const

◆ Error()

Adaptation::Answer Adaptation::Answer::Error ( bool  final)
static

Definition at line 17 of file Answer.cc.

References akError, debugs, and final.

Referenced by Adaptation::Initiate::tellQueryAborted().

◆ Forward()

◆ print()

std::ostream & Adaptation::Answer::print ( std::ostream &  os) const

Definition at line 53 of file Answer.cc.

Referenced by Adaptation::operator<<().

Member Data Documentation

◆ final

bool Adaptation::Answer::final

◆ kind

◆ message

◆ ruleId

std::optional<SBuf> Adaptation::Answer::ruleId

Definition at line 45 of file Answer.h.

Referenced by Block().


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