#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 24 of file Context.h.

Member Typedef Documentation

Definition at line 29 of file Context.h.

Member Enumeration Documentation

Enumerator
ESI_KICK_FAILED 
ESI_KICK_PENDING 
ESI_KICK_SENT 
ESI_KICK_INPROGRESS 

Definition at line 49 of file Context.h.

Constructor & Destructor Documentation

ESIContext::ESIContext ( )
inline

Definition at line 30 of file Context.h.

References flags.

ESIContext::~ESIContext ( )

Definition at line 821 of file Esi.cc.

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

Member Function Documentation

void ESIContext::addLiteral ( const char *  s,
int  len 
)
void ESIContext::appendOutboundData ( ESISegment::Pointer  theData)
private

Definition at line 252 of file Esi.cc.

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

Referenced by fail(), and provideData().

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

Reimplemented from esiTreeParent.

Definition at line 281 of file Esi.cc.

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

bool ESIContext::failed ( ) const
inline

Definition at line 137 of file Context.h.

References flags.

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

void ESIContext::finishChildren ( )

Definition at line 633 of file Esi.cc.

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

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

void ESIContext::finishRead ( )

Definition at line 225 of file Esi.cc.

References assert, and reading_.

Referenced by esiProcessStream().

void ESIContext::fixupOutboundTail ( )
private

Definition at line 290 of file Esi.cc.

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

Referenced by appendOutboundData(), and kick().

bool ESIContext::hasCachedAST ( ) const
private
void ESIContext::parserComment ( const char *  s)
privatevirtual
void ESIContext::parserDefault ( const char *  s,
int  len 
)
privatevirtual

Implements ESIParserClient.

Definition at line 1129 of file Esi.cc.

References addLiteral(), and failed().

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

Reimplemented from esiTreeParent.

Definition at line 267 of file Esi.cc.

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

bool ESIContext::reading ( ) const

Definition at line 231 of file Esi.cc.

References reading_.

Referenced by esiProcessStream(), and esiStreamRead().

void ESIContext::setError ( )

Definition at line 244 of file Esi.cc.

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

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

void ESIContext::setErrorMessage ( char const *  anError)

Definition at line 86 of file Context.cc.

References errormessage, and xstrdup.

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

void ESIContext::startRead ( )

Definition at line 219 of file Esi.cc.

References assert, and reading_.

Referenced by esiProcessStream(), and esiStreamRead().

void ESIContext::trimBlanks ( )
private

Definition at line 517 of file Esi.cc.

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

Referenced by provideData(), and send().

void ESIContext::updateCachedAST ( )
private

Member Data Documentation

ESISegment::Pointer ESIContext::buffered

Definition at line 97 of file Context.h.

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

bool ESIContext::cachedASTInUse

Definition at line 139 of file Context.h.

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

RefCount<ESIContext> ESIContext::cbdataLocker

Definition at line 136 of file Context.h.

Referenced by ESIContextNew(), and esiStreamDetach().

int ESIContext::clientwantsdata

Definition at line 88 of file Context.h.

Referenced by ESIContextNew(), and esiStreamRead().

int ESIContext::detached

Definition at line 90 of file Context.h.

Referenced by esiStreamDetach().

int ESIContext::error

Definition at line 85 of file Context.h.

char* ESIContext::errormessage

Definition at line 95 of file Context.h.

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

err_type ESIContext::errorpage

Definition at line 93 of file Context.h.

Referenced by fail(), and setError().

Http::StatusCode ESIContext::errorstatus

Definition at line 94 of file Context.h.

Referenced by fail(), and setError().

int ESIContext::finished

Definition at line 79 of file Context.h.

Referenced by esiStreamRead(), and esiStreamStatus().

int ESIContext::finishedtemplate

Definition at line 87 of file Context.h.

Referenced by esiProcessStream(), and esiStreamRead().

ClientHttpRequest* ESIContext::http

Definition at line 74 of file Context.h.

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

ESISegment::Pointer ESIContext::incoming

Definition at line 98 of file Context.h.

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

int ESIContext::kicked

Definition at line 89 of file Context.h.

int ESIContext::oktosend

Definition at line 78 of file Context.h.

Referenced by esiStreamRead(), and esiStreamStatus().

ESISegment::Pointer ESIContext::outbound
size_t ESIContext::outbound_offset

Definition at line 108 of file Context.h.

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

ESISegment::Pointer ESIContext::outboundtail
int ESIContext::passthrough

Definition at line 77 of file Context.h.

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

int64_t ESIContext::pos

Definition at line 110 of file Context.h.

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

bool ESIContext::processing
private

Definition at line 159 of file Context.h.

Referenced by process(), and provideData().

bool ESIContext::reading_
private

Definition at line 147 of file Context.h.

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

int64_t ESIContext::readpos

Definition at line 109 of file Context.h.

Referenced by esiProcessStream(), and esiStreamRead().

HttpReplyPointer ESIContext::rep

Definition at line 96 of file Context.h.

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

clientStreamNode* ESIContext::thisNode

Definition at line 70 of file Context.h.

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


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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors