NCBI C++ ToolKit
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members

Search Toolkit Book for CConnTest

#include <connect/ncbi_conn_test.hpp>

+ Inheritance diagram for CConnTest:
+ Collaboration diagram for CConnTest:

Classes

struct  CFWConnPoint
 Auxiliary class to hold FWDaemon CP(connection point) information and its current status. More...
 

Public Types

enum  EStage {
  eNone , eDns , eHttp , eDispatcher ,
  eStatelessService , eFirewallConnPoints , eFirewallConnections , eStatefulService
}
 Note that each stage has a previous one as a prerequisite, with the only exception for the stateful service (last check) that may work when forced into the stateless mode even if the firewall connections (in preceding check) have been found non-operational... More...
 

Public Member Functions

 CConnTest (const STimeout *timeout=kDefaultTimeout, CNcbiOstream *output=0, SIZE_TYPE width=72)
 Create test suite. More...
 
void SetWidth (SIZE_TYPE width=72)
 
void SetOutput (CNcbiOstream *output=0)
 
void SetTimeout (const STimeout *timeout=kDefaultTimeout)
 
void SetDebugPrintout (EDebugPrintout debug_printout)
 
void SetEmail (const string &email)
 
void SetCanceledCallback (const ICanceled *canceled)
 
virtual ~CConnTest ()
 
virtual EIO_Status Execute (EStage &stage, string *reason=0)
 Execute the test suite from the very first (eHttp) up to and including the requested "stage". More...
 

Static Public Member Functions

static bool IsNcbiInhouseClient (void) THROWS_NONE
 Return TRUE if the client is inside NCBI, FALSE otherwise. More...
 

Protected Member Functions

virtual EIO_Status DnsOkay (string *reason)
 User-redefinable checks for each stage. More...
 
virtual EIO_Status HttpOkay (string *reason)
 
virtual EIO_Status DispatcherOkay (string *reason)
 
virtual EIO_Status ServiceOkay (string *reason)
 
virtual EIO_Status GetFWConnections (string *reason)
 
virtual EIO_Status CheckFWConnections (string *reason)
 
virtual EIO_Status StatefulOkay (string *reason)
 
virtual EIO_Status ExtraCheckOnFailure (void)
 Last resort check. More...
 
virtual void PreCheck (EStage stage, unsigned int step, const string &title)
 User-defined rendering callbacks: PreCheck() and PostCheck(). More...
 
virtual void PostCheck (EStage stage, unsigned int step, EIO_Status status, const string &reason)
 PostCheck gets called upon successful ("status" contains eIO_Success) or unsuccessful (otherwise) completion of any step, with "reason" having an explanation in either case. More...
 
virtual EIO_Status ConnStatus (bool failure, CConn_IOStream *io)
 Helper function that assures to return eIO_Success if the predicate "failure" is false; and other code otherwise: either taken from the underlying CONN object, or eIO_Unknown as a fallback. More...
 
const stringGetCheckPoint (void) const
 Extended info of the last step IO. More...
 
- Protected Member Functions inherited from CConnIniter
 CConnIniter (void)
 

Protected Attributes

const STimeoutm_Timeout
 As supplied in constructor. More...
 
CNcbiOstreamm_Output
 
SIZE_TYPE m_Width
 
string m_Email
 Appearance. More...
 
EDebugPrintout m_DebugPrintout
 
bool m_HttpProxy
 Certain properties of communication as determined by configuration. More...
 
bool m_Stateless
 
bool m_Firewall
 
vector< CFWConnPointm_Fwd
 Firewall daemon configuration as obtained from NCBI. More...
 
vector< CFWConnPointm_FwdFB
 Fallback connection points. More...
 
bool m_End
 Check step start (false) / stop (true) indicator. More...
 

Private Member Functions

EIO_Status x_CheckTrap (string *reason)
 Pretect from runaway stage argument. More...
 
string x_TimeoutMsg (void)
 Return verbal timeout suggestion. More...
 
EIO_Status x_GetFirewallConfiguration (const SConnNetInfo *net_info, bool fwbports)
 Obtain and populate FWD connection points from NCBI. More...
 

Private Attributes

string m_CheckPoint
 
STimeout x_Timeout
 
CConstIRef< ICanceledm_Canceled
 Cancellation support. More...
 

Detailed Description

Definition at line 49 of file ncbi_conn_test.hpp.


The documentation for this class was generated from the following files:
Modified on Thu Jul 18 16:07:51 2024 by modify_doxy.py rev. 669887