GetNeedRetry(
void)
const;
74 voidSetNeedRetry(
void);
75 voidResetNeedRetry(
void);
81 boolIsSetStop(
void)
const;
83 const string& GetStopReason(
void)
const;
85 voidSetStop(
const string& reason);
87 voidResetStop(
void);
90 boolIsSetDelay(
void)
const;
92 const CTimeSpan& GetDelay(
void)
const;
96 voidSetDelay(
doublesec);
98 voidResetDelay(
void);
101 boolIsSetArgs(
void)
const;
103 const string&
GetArgs(
void)
const;
107 voidSetArgs(
const string& args);
111 voidSetArgs(
const CUrlArgs& args);
113 voidResetArgs(
void);
116 boolIsSetUrl(
void)
const;
118 const string& GetUrl(
void)
const;
121 voidSetUrl(
const string& url);
124 voidSetUrl(
const CUrl& url);
126 voidResetUrl(
void);
129 boolIsSetContentOverride(
void)
const;
131EContentOverride GetContentOverride(
void)
const;
133 voidSetContentOverride(EContentOverride content);
135 voidResetContentOverride(
void);
139 boolIsSetContent(
void)
const;
141 const string& GetContent(
void)
const;
145 voidSetContent(
const string& content);
147 voidResetContent(
void);
169fContentOverride = 1 << 4,
174 boolx_IsSetFlag(
FFlags f)
const;
200 voidParseHeader(
const char* http_header);
203 virtual voidGetValues(
TValues& values)
const;
228m_ContentOverride(eNot_set),
229m_NeedRetry(
false),
230m_NeedReconnect(
false)
HTTP-specific retry context implementation.
CRetryContext â Retry context.
Include a standard set of the NCBI C++ Toolkit most basic headers.
CObject & operator=(const CObject &src) THROWS_NONE
Assignment operator.
void x_SetFlag(FFlags f, bool value=true)
virtual void GetValues(TValues &) const
Fill name-value pairs (e.g.
static const char * kContent_Value
map< string, string > TValues
Map of name-value pairs.
static const char * kHeader_Stop
bool IsSetStop(void) const
Check if STOP flag is set.
bool IsSetUrl(void) const
Check if retry URL is set.
const CTimeSpan & GetDelay(void) const
Get retry delay.
void SetNeedReconnect(void)
Set need-reconnect flag.
bool NeedReconnect(void) const
Check if the client should reconnect (e.g. if URL or args have changed).
void ResetNeedReconnect(void)
Reset need-reconnect flag (e.g.
static const char * kHeader_Args
void ResetUrl(void)
Reset URL.
EContentOverride
Content override flags.
void SetStop(const string &reason)
Set STOP flag, clear all other options.
void ResetContent(void)
Reset content.
virtual ~CRetryContext(void)
bool IsSetContentOverride(void) const
Check if content source is set.
static const char * kHeader_Content
virtual ~CHttpRetryContext(void)
const string & GetUrl(void) const
Get retry URL.
const string & GetContent(void) const
Get retry content.
bool IsSetDelay(void) const
Check if retry delay is set.
bool x_IsSetFlag(FFlags f) const
void SetUrl(const string &url)
Set retry URL.
static const char * kContent_FromResponse
void SetDelay(CTimeSpan delay)
Set retry delay.
const string & GetArgs(void) const
Get retry args, URL-decoded.
void ResetArgs(void)
Reset args.
const string & GetStopReason(void) const
Get STOP reason (or empty string).
bool IsSetContent(void) const
Check if retry content is set and content-override flag assumes any content (eFromResponse or eData).
bool IsSetArgs(void) const
Check if retry args are set.
EContentOverride m_ContentOverride
EContentOverride GetContentOverride(void) const
Get content source.
void ResetNeedRetry(void)
static const char * kHeader_Url
void SetContent(const string &content)
Set retry content.
bool GetNeedRetry(void) const
Check if another retry attempt has been requested (any new headers except STOP received in the last r...
void SetContentOverride(EContentOverride content)
Set content source.
void ResetContentOverride(void)
Reset content source.
void ResetDelay(void)
Reset delay.
void Reset(void)
Clear all options.
void ResetStop(void)
Reset STOP flag and reason.
static const char * kHeader_Delay
void SetArgs(const string &args)
Set retry args.
static const char * kContent_None
@ eFromResponse
On retry send content from the response body.
@ eData
On retry send content from the response header.
@ eNoContent
Do not send any content on retry.
@ eNot_set
No content provided, send the original request data.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
void Set(long seconds, long nanoseconds=0)
Set time span in seconds and nanoseconds.
CTimeSpan & Clear(void)
Make the time span "empty",.
string GetQueryString(EAmpEncoding amp_enc, NStr::EUrlEncode encode) const
Construct and return complete query string.
string ComposeUrl(CUrlArgs::EAmpEncoding amp_enc, const IUrlEncoder *encoder=0) const
Compose the URL.
@ eAmp_Char
Use & to separate arguments.
const GenericPointer< typename T::ValueType > T2 value
#define GetArgs
Avoid preprocessor name clash with the NCBI C Toolkit.
Defines: CTimeFormat - storage class for time format.
NCBI_XUTIL_EXPORT
Parameter to control printing diagnostic message about conversion of static array data from a differe...
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4