#include <Context.h>

Inheritance diagram for ESIContext:
Collaboration diagram for ESIContext:

Classes

class  ParserState
 

Public Types

enum  esiKick_t {
  ESI_KICK_FAILED,
  ESI_KICK_PENDING,
  ESI_KICK_SENT,
  ESI_KICK_INPROGRESS
}
 
typedef RefCount< ESIContextPointer
 

Public Member Functions

 ESIContext ()
 
 ~ESIContext ()
 
void provideData (ESISegment::Pointer, ESIElement *source)
 
void fail (ESIElement *source, char const *anError=NULL)
 
void startRead ()
 
void finishRead ()
 
bool reading () const
 
void setError ()
 
void setErrorMessage (char const *)
 
void addStackElement (ESIElement::Pointer element)
 
void addLiteral (const char *s, int len)
 
void finishChildren ()
 
esiKick_t kick ()
 
bool failed () const
 

Public Attributes

clientStreamNodethisNode
 
ClientHttpRequesthttp
 
struct {
   int   passthrough:1
 
   int   oktosend:1
 
   int   finished:1
 
   int   error:1
 
   int   finishedtemplate:1
 
   int   clientwantsdata:1
 
   int   kicked:1
 
   int   detached:1
 
flags
 
err_type errorpage
 
Http::StatusCode errorstatus
 
char * errormessage
 
HttpReplyPointer rep
 
ESISegment::Pointer buffered
 
ESISegment::Pointer incoming
 
ESISegment::Pointer outbound
 
ESISegment::Pointer outboundtail
 
size_t outbound_offset
 
int64_t readpos
 
int64_t pos
 
class ESIContext::ParserState parserState
 
ESIVarStatevarState
 
ESIElement::Pointer tree
 
RefCount< ESIContextcbdataLocker
 
bool cachedASTInUse
 

Private Member Functions

 CBDATA_CLASS (ESIContext)
 
void fail ()
 
void freeResources ()
 
void fixupOutboundTail ()
 
void trimBlanks ()
 
size_t send ()
 
void appendOutboundData (ESISegment::Pointer theData)
 
esiProcessResult_t process ()
 
void parse ()
 
void parseOneBuffer ()
 
void updateCachedAST ()
 
bool hasCachedAST () const
 
void getCachedAST ()
 
virtual void start (const char *el, const char **attr, size_t attrCount)
 
virtual void end (const char *el)
 
virtual void parserDefault (const char *s, int len)
 
virtual void parserComment (const char *s)
 

Private Attributes

bool reading_
 
bool processing
 

Detailed Description

Definition at line 25 of file Context.h.

Member Typedef Documentation

◆ Pointer

Definition at line 30 of file Context.h.

Member Enumeration Documentation

◆ esiKick_t

Enumerator
ESI_KICK_FAILED 
ESI_KICK_PENDING 
ESI_KICK_SENT 
ESI_KICK_INPROGRESS 

Definition at line 50 of file Context.h.

Constructor & Destructor Documentation

◆ ESIContext()

ESIContext::ESIContext ( )
inline

Definition at line 31 of file Context.h.

References flags.

◆ ~ESIContext()

ESIContext::~ESIContext ( )

Definition at line 822 of file Esi.cc.

References debugs, errormessage, freeResources(), and safe_free.

Member Function Documentation

◆ addLiteral()

void ESIContext::addLiteral ( const char *  s,
int  len 
)

◆ addStackElement()

◆ appendOutboundData()

void ESIContext::appendOutboundData ( ESISegment::Pointer  theData)
private

Definition at line 253 of file Esi.cc.

References assert, debugs, fixupOutboundTail(), RefCount< C >::getRaw(), ESISegment::next, NULL, outbound, and outboundtail.

Referenced by fail(), and provideData().

◆ CBDATA_CLASS()

ESIContext::CBDATA_CLASS ( ESIContext  )
private

◆ end()

◆ fail() [1/2]

◆ fail() [2/2]

void ESIContext::fail ( ESIElement source,
char const *  anError = NULL 
)
virtual

Reimplemented from esiTreeParent.

Definition at line 282 of file Esi.cc.

References fail(), send(), setError(), and setErrorMessage().

◆ failed()

bool ESIContext::failed ( ) const
inline

Definition at line 138 of file Context.h.

References flags.

Referenced by addStackElement(), parserComment(), parserDefault(), and start().

◆ finishChildren()

void ESIContext::finishChildren ( )

Definition at line 634 of file Esi.cc.

References ESIElement::finish(), RefCount< C >::getRaw(), NULL, and tree.

Referenced by esiStreamDetach(), freeResources(), and process().

◆ finishRead()

void ESIContext::finishRead ( )

Definition at line 226 of file Esi.cc.

References assert, and reading_.

Referenced by esiProcessStream().

◆ fixupOutboundTail()

void ESIContext::fixupOutboundTail ( )
private

Definition at line 291 of file Esi.cc.

References RefCount< C >::getRaw(), outboundtail, and ESISegment::tail().

Referenced by appendOutboundData(), and kick().

◆ freeResources()

◆ getCachedAST()

◆ hasCachedAST()

bool ESIContext::hasCachedAST ( ) const
private

◆ kick()

◆ parse()

◆ parseOneBuffer()

◆ parserComment()

void ESIContext::parserComment ( const char *  s)
privatevirtual

◆ parserDefault()

void ESIContext::parserDefault ( const char *  s,
int  len 
)
privatevirtual

Implements ESIParserClient.

Definition at line 1135 of file Esi.cc.

References addLiteral(), failed(), and len.

◆ process()

◆ provideData()

void ESIContext::provideData ( ESISegment::Pointer  theData,
ESIElement source 
)
virtual

Reimplemented from esiTreeParent.

Definition at line 268 of file Esi.cc.

References appendOutboundData(), assert, debugs, RefCount< C >::getRaw(), processing, send(), tree, and trimBlanks().

◆ reading()

bool ESIContext::reading ( ) const

Definition at line 232 of file Esi.cc.

References reading_.

Referenced by esiProcessStream(), and esiStreamRead().

◆ send()

◆ setError()

void ESIContext::setError ( )

Definition at line 245 of file Esi.cc.

References ERR_ESI, errorpage, errorstatus, flags, and Http::scInternalServerError.

Referenced by fail(), parse(), parseOneBuffer(), parserComment(), and process().

◆ setErrorMessage()

void ESIContext::setErrorMessage ( char const *  anError)

Definition at line 86 of file Context.cc.

References errormessage, and xstrdup.

Referenced by fail(), parse(), parseOneBuffer(), parserComment(), and process().

◆ start()

◆ startRead()

void ESIContext::startRead ( )

Definition at line 220 of file Esi.cc.

References assert, and reading_.

Referenced by esiProcessStream(), and esiStreamRead().

◆ trimBlanks()

void ESIContext::trimBlanks ( )
private

Definition at line 518 of file Esi.cc.

References assert, debugs, RefCount< C >::getRaw(), ESISegment::len, ESISegment::next, outbound, and outboundtail.

Referenced by provideData(), and send().

◆ updateCachedAST()

void ESIContext::updateCachedAST ( )
private

Member Data Documentation

◆ buffered

ESISegment::Pointer ESIContext::buffered

Definition at line 98 of file Context.h.

Referenced by esiProcessStream(), esiStreamRead(), freeResources(), parse(), parseOneBuffer(), and process().

◆ cachedASTInUse

bool ESIContext::cachedASTInUse

Definition at line 140 of file Context.h.

Referenced by esiProcessStream(), esiStreamRead(), getCachedAST(), and process().

◆ cbdataLocker

RefCount<ESIContext> ESIContext::cbdataLocker

Definition at line 137 of file Context.h.

Referenced by ESIContextNew(), and esiStreamDetach().

◆ clientwantsdata

int ESIContext::clientwantsdata

Definition at line 89 of file Context.h.

Referenced by ESIContextNew(), and esiStreamRead().

◆ detached

int ESIContext::detached

Definition at line 91 of file Context.h.

Referenced by esiStreamDetach().

◆ error

int ESIContext::error

Definition at line 86 of file Context.h.

◆ errormessage

char* ESIContext::errormessage

Definition at line 96 of file Context.h.

Referenced by fail(), setErrorMessage(), and ~ESIContext().

◆ errorpage

err_type ESIContext::errorpage

Definition at line 94 of file Context.h.

Referenced by fail(), and setError().

◆ errorstatus

Http::StatusCode ESIContext::errorstatus

Definition at line 95 of file Context.h.

Referenced by fail(), and setError().

◆ finished

int ESIContext::finished

Definition at line 80 of file Context.h.

Referenced by esiStreamRead(), and esiStreamStatus().

◆ finishedtemplate

int ESIContext::finishedtemplate

Definition at line 88 of file Context.h.

Referenced by esiProcessStream(), and esiStreamRead().

◆ flags

◆ http

ClientHttpRequest* ESIContext::http

Definition at line 75 of file Context.h.

Referenced by ESIContextNew(), fail(), getCachedAST(), hasCachedAST(), send(), and updateCachedAST().

◆ incoming

ESISegment::Pointer ESIContext::incoming

Definition at line 99 of file Context.h.

Referenced by esiProcessStream(), esiStreamRead(), parse(), and process().

◆ kicked

int ESIContext::kicked

Definition at line 90 of file Context.h.

◆ oktosend

int ESIContext::oktosend

Definition at line 79 of file Context.h.

Referenced by esiStreamRead(), and esiStreamStatus().

◆ outbound

ESISegment::Pointer ESIContext::outbound

◆ outbound_offset

size_t ESIContext::outbound_offset

Definition at line 109 of file Context.h.

Referenced by esiStreamStatus(), fail(), and send().

◆ outboundtail

ESISegment::Pointer ESIContext::outboundtail

◆ parserState

◆ passthrough

int ESIContext::passthrough

Definition at line 78 of file Context.h.

Referenced by ESIContextNew(), esiProcessStream(), esiStreamRead(), and esiStreamStatus().

◆ pos

int64_t ESIContext::pos

Definition at line 111 of file Context.h.

Referenced by fail(), kick(), and send().

◆ processing

bool ESIContext::processing
private

Definition at line 160 of file Context.h.

Referenced by process(), and provideData().

◆ reading_

bool ESIContext::reading_
private

Definition at line 148 of file Context.h.

Referenced by finishRead(), reading(), and startRead().

◆ readpos

int64_t ESIContext::readpos

Definition at line 110 of file Context.h.

Referenced by esiProcessStream(), and esiStreamRead().

◆ rep

HttpReplyPointer ESIContext::rep

Definition at line 97 of file Context.h.

Referenced by ESIContextNew(), fail(), freeResources(), parse(), and send().

◆ thisNode

clientStreamNode* ESIContext::thisNode

Definition at line 71 of file Context.h.

Referenced by ESIContextNew(), esiStreamDetach(), and send().

◆ tree

◆ varState


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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors