NCBI C++ ToolKit
Public Member Functions | Protected Types | Protected Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
CCgiRequestProcessor Class Reference

Search Toolkit Book for CCgiRequestProcessor

Base class for request processors. More...

#include <cgi/cgiapp.hpp>

+ Inheritance diagram for CCgiRequestProcessor:
+ Collaboration diagram for CCgiRequestProcessor:

Public Member Functions

 CCgiRequestProcessor (CCgiApplication &app)
 
virtual ~CCgiRequestProcessor (void)
 
virtual int ProcessRequest (CCgiContext &context)
 Process request provided by the context. By default calls application's ProcessRequest. More...
 
const CNcbiResourceGetResource (void) const
 
CNcbiResourceGetResource (void)
 
virtual bool ValidateSynchronizationToken (void)
 
string GetSelfReferer (void) const
 Get self-URL to be used as referer. More...
 
CCgiApplicationGetApp (void)
 
const CCgiApplicationGetApp (void) const
 
CCgiContextGetContext (void)
 
const CCgiContextGetContext (void) const
 
void SetContext (shared_ptr< CCgiContext > context)
 
bool IsSetContext (void) const
 
CArgsGetArgs (void)
 
const CArgsGetArgs (void) const
 
bool IsSetArgs (void) const
 
CNcbiIstreamGetInputStream (void)
 
const CNcbiIstreamGetInputStream (void) const
 
void SetInputStream (CNcbiIstream *in)
 
bool IsSetInputStream (void) const
 
CNcbiOstreamGetOutputStream (void)
 
const CNcbiOstreamGetOutputStream (void) const
 
void SetOutputStream (CNcbiOstream *out)
 
bool IsSetOutputStream (void) const
 
bool GetOutputBroken (void) const
 
void SetOutputBroken (bool val)
 
bool GetRequestStartPrinted (void) const
 
void SetRequestStartPrinted (bool val)
 
bool GetErrorStatus (void) const
 
void SetErrorStatus (bool val)
 
string GetRID (void) const
 
void SetRID (const string &val)
 
bool GetResultReady (void) const
 
void SetResultReady (bool val)
 

Protected Types

typedef CCgiApplication::TAcceptEntries TAcceptEntries
 
typedef CCgiApplication::SAcceptEntry TAcceptEntry
 

Protected Member Functions

virtual void ProcessHelpRequest (const string &format)
 
virtual void ProcessVersionRequest (CCgiApplication::EVersionType ver_type)
 
virtual bool ProcessAdminRequest (CCgiApplication::EAdminCommand cmd)
 
virtual int OnException (std::exception &e, CNcbiOstream &os)
 
virtual void OnEvent (CCgiApplication::EEvent event, int status)
 
void SetHTTPStatus (unsigned int status, const string &reason=kEmptyStr)
 
void SetRequestId (const string &rid, bool is_done)
 
void ParseAcceptHeader (TAcceptEntries &entries) const
 

Private Member Functions

void x_InitArgs (void) const
 
bool ProcessAdminRequest_Base (CCgiApplication::EAdminCommand cmd)
 

Private Attributes

CCgiApplicationm_App
 
shared_ptr< CCgiContextm_Context
 
unique_ptr< CArgsm_CgiArgs
 
unique_ptr< CNcbiIstreamm_InputStream
 
unique_ptr< CNcbiOstreamm_OutputStream
 
bool m_OutputBroken = false
 
bool m_RequestStartPrinted = false
 
bool m_ErrorStatus = false
 
string m_RID
 
bool m_IsResultReady = true
 

Friends

class CCgiApplication
 

Detailed Description

Base class for request processors.

See also
CCgiApplication::CreateRequestProcessor()

Definition at line 578 of file cgiapp.hpp.


The documentation for this class was generated from the following files:
Modified on Tue Jun 18 13:33:17 2024 by modify_doxy.py rev. 669887