NCBI C++ ToolKit
|
Search Toolkit Book for CEutilsClient
Class for querying via E-Utils. More...
#include <misc/eutils_client/eutils_client.hpp>
Classes | |
class | CMessageHandler |
Subclass this to override how messages (warnings and errors) are handled. More... | |
Public Types | |
enum | EUseHistory { eUseHistoryDisabled = 1 , eUseHistoryEnabled } |
enum | EContentType { eContentType_default = 1 , eContentType_xml , eContentType_text , eContentType_html , eContentType_asn1 } |
Public Member Functions | |
CEutilsClient () | |
CEutilsClient (const string &host) | |
void | SetMessageHandlerDefault (void) |
Default is to log all messages at informational level. More... | |
void | SetMessageHandlerDiagPost (void) |
Equivalent to: ERR_POST(Warning|Error << ...). More... | |
void | SetMessageHandlerThrowOnError (void) |
Equivalent to: NCBI_THROW, ERR_POST, LOG_POST as appropriate. More... | |
void | SetMessageHandler (CMessageHandler &message_handler) |
Set custom message handler. More... | |
void | SetUserTag (const string &tag) |
void | SetMaxReturn (int ret_max) |
void | SetLinkName (const string &link_name) |
void | ClearAddedParameters () |
void | AddParameter (const string &name, const string &value) |
Uint8 | Count (const string &db, const string &term) |
Uint8 | Search (const string &db, const string &term, vector< objects::CSeq_id_Handle > &uids, const string &xml_path=kEmptyStr) |
Uint8 | Search (const string &db, const string &term, vector< string > &uids, const string &xml_path=kEmptyStr) |
Uint8 | Search (const string &db, const string &term, vector< TEntrezId > &uids, const string &xml_path=kEmptyStr) |
void | Search (const string &db, const string &term, CNcbiOstream &ostr, EUseHistory use_history=eUseHistoryDisabled) |
void | SearchHistory (const string &db, const string &term, const string &web_env, Int8 query_key, int retstart, CNcbiOstream &ostr) |
void | SearchHistory (const string &db, const string &term, const string &web_env, objects::CSeq_id_Handle query_key, int retstart, CNcbiOstream &ostr) |
void | SearchHistory (const string &db, const string &term, const string &web_env, const string &query_key, int retstart, CNcbiOstream &ostr) |
void | Link (const string &db_from, const string &db_to, const vector< objects::CSeq_id_Handle > &uids_from, vector< objects::CSeq_id_Handle > &uids_to, const string &xml_path=kEmptyStr, const string &command="neighbor") |
void | Link (const string &db_from, const string &db_to, const vector< string > &uids_from, vector< string > &uids_to, const string &xml_path=kEmptyStr, const string &command="neighbor") |
void | Link (const string &db_from, const string &db_to, const vector< TEntrezId > &uids_from, vector< TEntrezId > &uids_to, const string &xml_path=kEmptyStr, const string &command="neighbor") |
void | Link (const string &db_from, const string &db_to, const vector< TEntrezId > &uids_from, vector< objects::CSeq_id_Handle > &uids_to, const string &xml_path=kEmptyStr, const string &command="neighbor") |
void | Link (const string &db_from, const string &db_to, const vector< objects::CSeq_id_Handle > &uids_from, vector< TEntrezId > &uids_to, const string &xml_path=kEmptyStr, const string &command="neighbor") |
void | Link (const string &db_from, const string &db_to, const vector< objects::CSeq_id_Handle > &uids_from, CNcbiOstream &ostr, const string &command="neighbor") |
void | Link (const string &db_from, const string &db_to, const vector< string > &uids_from, CNcbiOstream &ostr, const string &command="neighbor") |
void | Link (const string &db_from, const string &db_to, const vector< TEntrezId > &uids_from, CNcbiOstream &ostr, const string &command="neighbor") |
void | LinkHistory (const string &db_from, const string &db_to, const string &web_env, Int8 query_key, CNcbiOstream &ostr) |
void | LinkHistory (const string &db_from, const string &db_to, const string &web_env, objects::CSeq_id_Handle query_key, CNcbiOstream &ostr) |
void | LinkHistory (const string &db_from, const string &db_to, const string &web_env, const string &query_key, CNcbiOstream &ostr) |
void | LinkOut (const string &db, const vector< objects::CSeq_id_Handle > &uids, xml::document &docsums, const string &cmd="llinks") |
void | LinkOut (const string &db, const vector< string > &uids, xml::document &docsums, const string &cmd="llinks") |
void | LinkOut (const string &db, const vector< TEntrezId > &uids, xml::document &docsums, const string &cmd="llinks") |
void | Summary (const string &db, const vector< objects::CSeq_id_Handle > &uids, xml::document &docsums, const string &version="") |
void | Summary (const string &db, const vector< string > &uids, xml::document &docsums, const string &version="") |
void | Summary (const string &db, const vector< TEntrezId > &uids, xml::document &docsums, const string &version="") |
void | SummaryHistory (const string &db, const string &web_env, Int8 query_key, int retstart, const string &version, CNcbiOstream &ostr) |
void | SummaryHistory (const string &db, const string &web_env, objects::CSeq_id_Handle query_key, int retstart, const string &version, CNcbiOstream &ostr) |
void | SummaryHistory (const string &db, const string &web_env, const string &query_key, int retstart, const string &version, CNcbiOstream &ostr) |
void | Fetch (const string &db, const vector< objects::CSeq_id_Handle > &uids, CNcbiOstream &ostr, const string &retmode="xml") |
void | Fetch (const string &db, const vector< string > &uids, CNcbiOstream &ostr, const string &retmode="xml") |
void | Fetch (const string &db, const vector< TEntrezId > &uids, CNcbiOstream &ostr, const string &retmode="xml") |
void | FetchHistory (const string &db, const string &web_env, Int8 query_key, int retstart, EContentType content_type, CNcbiOstream &ostr) |
void | FetchHistory (const string &db, const string &web_env, objects::CSeq_id_Handle query_key, int retstart, EContentType content_type, CNcbiOstream &ostr) |
void | FetchHistory (const string &db, const string &web_env, const string &query_key, int retstart, EContentType content_type, CNcbiOstream &ostr) |
const list< string > | GetUrl (void) const |
const list< CTime > | GetTime (void) const |
void | SetWaitTime (const CIncreasingTime &wait_time) |
void | SetMaxRetries (unsigned int max_retries) |
void | SetConnTimeout (const CTimeout &timeout) |
Protected Types | |
typedef map< string, string > | TParamList |
Protected Member Functions | |
Uint8 | ParseSearchResults (CNcbiIstream &istr, vector< objects::CSeq_id_Handle > &uids) |
Uint8 | ParseSearchResults (CNcbiIstream &istr, vector< string > &uids) |
Uint8 | ParseSearchResults (CNcbiIstream &istr, vector< TEntrezId > &uids) |
Uint8 | ParseSearchResults (const string &xml_file, vector< objects::CSeq_id_Handle > &uids) |
Uint8 | ParseSearchResults (const string &xml_file, vector< string > &uids) |
Uint8 | ParseSearchResults (const string &xml_file, vector< TEntrezId > &uids) |
const string & | x_GetHostName (void) const |
void | x_Get (string const &path, string const ¶ms, CNcbiOstream &ostr) |
void | x_AddAdditionalParameters (string ¶ms) |
template<class T > | |
Uint8 | x_Search (const string &db, const string &term, vector< T > &uids, const string &xml_path=kEmptyStr) |
template<class T1 , class T2 > | |
void | x_Link (const string &db_from, const string &db_to, const vector< T1 > &uids_from, vector< T2 > &uids_to, const string &xml_path, const string &command) |
template<class T > | |
void | x_Link (const string &db_from, const string &db_to, const vector< T > &uids_from, CNcbiOstream &ostr, const string &command) |
template<class T > | |
void | x_LinkOut (const string &db, const vector< T > &uids, xml::document &doc, const string &cmd) |
template<class T > | |
void | x_Summary (const string &db, const vector< T > &uids, xml::document &docsums, const string &version="") |
template<class T > | |
void | x_Fetch (const string &db, const vector< T > &uids, CNcbiOstream &ostr, const string &retmode="xml") |
template<class T > | |
Uint8 | x_ParseSearchResults (const string &xml_file, vector< T > &uids) |
template<class T > | |
Uint8 | x_ParseSearchResults (CNcbiIstream &istr, vector< T > &uids) |
template<class Call > | |
std::invoke_result< Call >::type | CallWithRetry (Call &&call, const char *name) |
Static Protected Member Functions | |
static string | x_BuildUrl (const string &host, const string &path, const string ¶ms) |
Protected Attributes | |
CRef< CMessageHandler > | m_MessageHandler |
int | m_CachedHostNameCount |
string | m_CachedHostName |
string | m_HostName |
string | m_UrlTag |
TParamList | m_AdditionalParams |
int | m_RetMax |
string | m_LinkName |
list< string > | m_Url |
list< CTime > | m_Time |
Private Member Functions | |
void | x_InitParams (void) |
Uint8 | x_CountOnce (const string ¶ms) |
template<class T > | |
Uint8 | x_SearchOnce (const string ¶ms, vector< T > &uids, const string &xml_path) |
void | x_GetOnce (string const &path, string const &extra_params, CNcbiOstream &ostr) |
template<class T > | |
void | x_LinkOnceT (const string &db_from, const string &db_to, vector< T > &uids_to, const string &xml_path, const string ¶ms) |
void | x_LinkOnce (CNcbiOstream &ostr, const string ¶ms) |
void | x_LinkOutOnce (xml::document &doc, const string ¶ms) |
void | x_SummaryOnce (xml::document &docsums, const string ¶ms) |
void | x_FetchOnce (CNcbiOstream &ostr, const string ¶ms) |
Private Attributes | |
unsigned int | m_MaxRetries |
CIncreasingTime | m_WaitTime |
unsigned int | m_Attempt = 0 |
CTimeout | m_Timeout |
Class for querying via E-Utils.
Definition at line 76 of file eutils_client.hpp.
|
protected |
Definition at line 443 of file eutils_client.hpp.
Enumerator | |
---|---|
eContentType_default | |
eContentType_xml | |
eContentType_text | |
eContentType_html | |
eContentType_asn1 |
Definition at line 102 of file eutils_client.hpp.
Enumerator | |
---|---|
eUseHistoryDisabled | |
eUseHistoryEnabled |
Definition at line 97 of file eutils_client.hpp.
CEutilsClient::CEutilsClient | ( | ) |
Definition at line 527 of file eutils_client.cpp.
References SetMessageHandlerDefault(), and x_InitParams().
Definition at line 537 of file eutils_client.cpp.
References SetMessageHandlerDefault(), and x_InitParams().
Definition at line 581 of file eutils_client.cpp.
References m_AdditionalParams, NStr::URLEncode(), and rapidjson::value.
|
protected |
Definition at line 631 of file eutils_client.cpp.
References CIncreasingTime::GetTime(), LOG_POST, m_Attempt, m_MaxRetries, m_WaitTime, SleepMilliSec(), Warning(), and CException::what().
Referenced by Count(), x_Fetch(), x_Get(), x_Link(), x_LinkOut(), x_Search(), and x_Summary().
void CEutilsClient::ClearAddedParameters | ( | ) |
Definition at line 576 of file eutils_client.cpp.
References map_checker< Container >::clear(), and m_AdditionalParams.
Definition at line 654 of file eutils_client.cpp.
References CallWithRetry(), eUnknown, LOG_POST, m_Time, m_Url, m_UrlTag, NCBI_THROW, Trace(), NStr::URLEncode(), x_AddAdditionalParameters(), and x_CountOnce().
Referenced by pub_report::CSkipPubJournalHook::IsJournalMissing(), and CAssemblyInfo::x_ValidateTaxId().
void CEutilsClient::Fetch | ( | const string & | db, |
const vector< string > & | uids, | ||
CNcbiOstream & | ostr, | ||
const string & | retmode = "xml" |
||
) |
Definition at line 1668 of file eutils_client.cpp.
References x_Fetch().
void CEutilsClient::Fetch | ( | const string & | db, |
const vector< TEntrezId > & | uids, | ||
CNcbiOstream & | ostr, | ||
const string & | retmode = "xml" |
||
) |
Definition at line 1676 of file eutils_client.cpp.
References x_Fetch().
void CEutilsClient::FetchHistory | ( | const string & | db, |
const string & | web_env, | ||
const string & | query_key, | ||
int | retstart, | ||
EContentType | content_type, | ||
CNcbiOstream & | ostr | ||
) |
Definition at line 1792 of file eutils_client.cpp.
References m_RetMax, s_FetchHistoryQuery(), and x_Get().
void CEutilsClient::FetchHistory | ( | const string & | db, |
const string & | web_env, | ||
Int8 | query_key, | ||
int | retstart, | ||
EContentType | content_type, | ||
CNcbiOstream & | ostr | ||
) |
Definition at line 1763 of file eutils_client.cpp.
References m_RetMax, s_FetchHistoryQuery(), and x_Get().
Referenced by BOOST_AUTO_TEST_CASE().
void CEutilsClient::FetchHistory | ( | const string & | db, |
const string & | web_env, | ||
objects::CSeq_id_Handle | query_key, | ||
int | retstart, | ||
EContentType | content_type, | ||
CNcbiOstream & | ostr | ||
) |
Definition at line 1812 of file eutils_client.cpp.
References m_Time.
Definition at line 1807 of file eutils_client.cpp.
References m_Url.
void CEutilsClient::Link | ( | const string & | db_from, |
const string & | db_to, | ||
const vector< objects::CSeq_id_Handle > & | uids_from, | ||
CNcbiOstream & | ostr, | ||
const string & | command = "neighbor" |
||
) |
void CEutilsClient::Link | ( | const string & | db_from, |
const string & | db_to, | ||
const vector< objects::CSeq_id_Handle > & | uids_from, | ||
vector< objects::CSeq_id_Handle > & | uids_to, | ||
const string & | xml_path = kEmptyStr , |
||
const string & | command = "neighbor" |
||
) |
Referenced by BOOST_AUTO_TEST_CASE(), and s_ELinkQuery().
void CEutilsClient::Link | ( | const string & | db_from, |
const string & | db_to, | ||
const vector< objects::CSeq_id_Handle > & | uids_from, | ||
vector< TEntrezId > & | uids_to, | ||
const string & | xml_path = kEmptyStr , |
||
const string & | command = "neighbor" |
||
) |
void CEutilsClient::Link | ( | const string & | db_from, |
const string & | db_to, | ||
const vector< string > & | uids_from, | ||
CNcbiOstream & | ostr, | ||
const string & | command = "neighbor" |
||
) |
Definition at line 1293 of file eutils_client.cpp.
void CEutilsClient::Link | ( | const string & | db_from, |
const string & | db_to, | ||
const vector< string > & | uids_from, | ||
vector< string > & | uids_to, | ||
const string & | xml_path = kEmptyStr , |
||
const string & | command = "neighbor" |
||
) |
Definition at line 1127 of file eutils_client.cpp.
void CEutilsClient::Link | ( | const string & | db_from, |
const string & | db_to, | ||
const vector< TEntrezId > & | uids_from, | ||
CNcbiOstream & | ostr, | ||
const string & | command = "neighbor" |
||
) |
Definition at line 1302 of file eutils_client.cpp.
void CEutilsClient::Link | ( | const string & | db_from, |
const string & | db_to, | ||
const vector< TEntrezId > & | uids_from, | ||
vector< objects::CSeq_id_Handle > & | uids_to, | ||
const string & | xml_path = kEmptyStr , |
||
const string & | command = "neighbor" |
||
) |
void CEutilsClient::Link | ( | const string & | db_from, |
const string & | db_to, | ||
const vector< TEntrezId > & | uids_from, | ||
vector< TEntrezId > & | uids_to, | ||
const string & | xml_path = kEmptyStr , |
||
const string & | command = "neighbor" |
||
) |
Definition at line 1137 of file eutils_client.cpp.
void CEutilsClient::LinkHistory | ( | const string & | db_from, |
const string & | db_to, | ||
const string & | web_env, | ||
const string & | query_key, | ||
CNcbiOstream & | ostr | ||
) |
Definition at line 1391 of file eutils_client.cpp.
References NStr::URLEncode(), and x_Get().
void CEutilsClient::LinkHistory | ( | const string & | db_from, |
const string & | db_to, | ||
const string & | web_env, | ||
Int8 | query_key, | ||
CNcbiOstream & | ostr | ||
) |
Definition at line 1356 of file eutils_client.cpp.
References NStr::URLEncode(), and x_Get().
void CEutilsClient::LinkHistory | ( | const string & | db_from, |
const string & | db_to, | ||
const string & | web_env, | ||
objects::CSeq_id_Handle | query_key, | ||
CNcbiOstream & | ostr | ||
) |
void CEutilsClient::LinkOut | ( | const string & | db, |
const vector< objects::CSeq_id_Handle > & | uids, | ||
xml::document & | docsums, | ||
const string & | cmd = "llinks" |
||
) |
Definition at line 1420 of file eutils_client.cpp.
References cmd, and x_LinkOut().
Referenced by BOOST_AUTO_TEST_CASE().
void CEutilsClient::LinkOut | ( | const string & | db, |
const vector< string > & | uids, | ||
xml::document & | docsums, | ||
const string & | cmd = "llinks" |
||
) |
Definition at line 1428 of file eutils_client.cpp.
References cmd, and x_LinkOut().
void CEutilsClient::LinkOut | ( | const string & | db, |
const vector< TEntrezId > & | uids, | ||
xml::document & | docsums, | ||
const string & | cmd = "llinks" |
||
) |
Definition at line 1436 of file eutils_client.cpp.
References cmd, and x_LinkOut().
|
protected |
Referenced by x_GetOnce(), x_ParseSearchResults(), and x_SearchOnce().
|
protected |
Definition at line 722 of file eutils_client.cpp.
References x_ParseSearchResults().
|
protected |
Definition at line 728 of file eutils_client.cpp.
References x_ParseSearchResults().
|
protected |
|
protected |
Definition at line 774 of file eutils_client.cpp.
References x_ParseSearchResults().
|
protected |
Definition at line 780 of file eutils_client.cpp.
References x_ParseSearchResults().
void CEutilsClient::Search | ( | const string & | db, |
const string & | term, | ||
CNcbiOstream & | ostr, | ||
EUseHistory | use_history = eUseHistoryDisabled |
||
) |
Definition at line 917 of file eutils_client.cpp.
References eUseHistoryEnabled, m_RetMax, NStr::URLEncode(), and x_Get().
Uint8 CEutilsClient::Search | ( | const string & | db, |
const string & | term, | ||
vector< string > & | uids, | ||
const string & | xml_path = kEmptyStr |
||
) |
Definition at line 816 of file eutils_client.cpp.
References x_Search().
Uint8 CEutilsClient::Search | ( | const string & | db, |
const string & | term, | ||
vector< TEntrezId > & | uids, | ||
const string & | xml_path = kEmptyStr |
||
) |
Definition at line 825 of file eutils_client.cpp.
References x_Search().
void CEutilsClient::SearchHistory | ( | const string & | db, |
const string & | term, | ||
const string & | web_env, | ||
const string & | query_key, | ||
int | retstart, | ||
CNcbiOstream & | ostr | ||
) |
Definition at line 993 of file eutils_client.cpp.
References m_RetMax, s_SearchHistoryQuery(), and x_Get().
void CEutilsClient::SearchHistory | ( | const string & | db, |
const string & | term, | ||
const string & | web_env, | ||
Int8 | query_key, | ||
int | retstart, | ||
CNcbiOstream & | ostr | ||
) |
Definition at line 962 of file eutils_client.cpp.
References m_RetMax, s_SearchHistoryQuery(), and x_Get().
Referenced by BOOST_AUTO_TEST_CASE(), and CSeqUtils::ESearchQuery().
void CEutilsClient::SearchHistory | ( | const string & | db, |
const string & | term, | ||
const string & | web_env, | ||
objects::CSeq_id_Handle | query_key, | ||
int | retstart, | ||
CNcbiOstream & | ostr | ||
) |
Definition at line 412 of file eutils_client.hpp.
References m_Timeout.
Definition at line 586 of file eutils_client.cpp.
References m_LinkName.
|
inline |
Definition at line 411 of file eutils_client.hpp.
References m_MaxRetries.
void CEutilsClient::SetMaxReturn | ( | int | ret_max | ) |
Definition at line 591 of file eutils_client.cpp.
References m_RetMax.
Referenced by BOOST_AUTO_TEST_CASE(), CNADocSumIterator::CNADocSumIterator(), CSeqUtils::ESearchQuery(), CSeqUtils::GetAssmAccs_Gi(), CSeqUtils::GetAssmIds_GI(), CSeqUtils::GetAssmIds_GIChr(), CReloadPublications::LookUpByPmid(), CDoiLookup::LookupIsojta(), CEntrezDB::Query(), s_ELinkQuery(), s_ESearchQuery(), CMacroFunction_LookupPub::s_GetArticleFromEntrezById(), CAssemblyInfo::x_FilterTaxIds(), CAssemblyInfo::x_GetAssmInfo(), CNAUtils::x_GetNAId(), CRelaxedLookupDlg::x_GetPubIds(), and CAssemblyInfo::x_SearchIds().
void CEutilsClient::SetMessageHandler | ( | CMessageHandler & | message_handler | ) |
Set custom message handler.
Definition at line 566 of file eutils_client.cpp.
References m_MessageHandler.
void CEutilsClient::SetMessageHandlerDefault | ( | void | ) |
Default is to log all messages at informational level.
Equivalent to: LOG_POST(Info << ...).
Definition at line 551 of file eutils_client.cpp.
References m_MessageHandler.
Referenced by CEutilsClient().
void CEutilsClient::SetMessageHandlerDiagPost | ( | void | ) |
Equivalent to: ERR_POST(Warning|Error << ...).
Definition at line 556 of file eutils_client.cpp.
References m_MessageHandler.
void CEutilsClient::SetMessageHandlerThrowOnError | ( | void | ) |
Equivalent to: NCBI_THROW, ERR_POST, LOG_POST as appropriate.
Definition at line 561 of file eutils_client.cpp.
References m_MessageHandler.
Definition at line 571 of file eutils_client.cpp.
|
inline |
Definition at line 410 of file eutils_client.hpp.
References m_WaitTime.
void CEutilsClient::Summary | ( | const string & | db, |
const vector< string > & | uids, | ||
xml::document & | docsums, | ||
const string & | version = "" |
||
) |
Definition at line 1513 of file eutils_client.cpp.
References dtl::version, and x_Summary().
void CEutilsClient::Summary | ( | const string & | db, |
const vector< TEntrezId > & | uids, | ||
xml::document & | docsums, | ||
const string & | version = "" |
||
) |
Definition at line 1521 of file eutils_client.cpp.
References dtl::version, and x_Summary().
void CEutilsClient::SummaryHistory | ( | const string & | db, |
const string & | web_env, | ||
const string & | query_key, | ||
int | retstart, | ||
const string & | version, | ||
CNcbiOstream & | ostr | ||
) |
Definition at line 1636 of file eutils_client.cpp.
References m_RetMax, s_SummaryHistoryQuery(), dtl::version, and x_Get().
void CEutilsClient::SummaryHistory | ( | const string & | db, |
const string & | web_env, | ||
Int8 | query_key, | ||
int | retstart, | ||
const string & | version, | ||
CNcbiOstream & | ostr | ||
) |
Definition at line 1609 of file eutils_client.cpp.
References m_RetMax, s_SummaryHistoryQuery(), dtl::version, and x_Get().
Referenced by BOOST_AUTO_TEST_CASE().
void CEutilsClient::SummaryHistory | ( | const string & | db, |
const string & | web_env, | ||
objects::CSeq_id_Handle | query_key, | ||
int | retstart, | ||
const string & | version, | ||
CNcbiOstream & | ostr | ||
) |
|
inlineprotected |
Definition at line 1827 of file eutils_client.cpp.
References map_checker< Container >::empty(), and m_AdditionalParams.
Referenced by Count(), x_Fetch(), x_Get(), x_Link(), x_LinkOut(), x_Search(), and x_Summary().
|
staticprotected |
Definition at line 1817 of file eutils_client.cpp.
Referenced by x_CountOnce(), x_FetchOnce(), x_GetOnce(), x_LinkOnce(), x_LinkOnceT(), x_LinkOutOnce(), x_SearchOnce(), and x_SummaryOnce().
Definition at line 681 of file eutils_client.cpp.
References CTime::eCurrent, eUnknown, fHTTP_AutoReconnect, g_CTimeoutToSTimeout(), CESearchParser< T >::GetCount(), xml::error_messages::has_errors(), xml::error_messages::has_fatal_errors(), kEmptyStr, m_MessageHandler, m_Time, m_Timeout, m_Url, NCBI_THROW, xml::event_parser::parse_stream(), xml::error_messages::print(), CESearchParser< T >::ProcessMessages(), x_BuildUrl(), and x_GetHostName().
Referenced by Count().
|
protected |
Definition at line 1685 of file eutils_client.cpp.
References CallWithRetry(), eUnknown, m_Time, m_Url, NCBI_THROW, s_FormatIds(), NStr::URLEncode(), x_AddAdditionalParameters(), and x_FetchOnce().
Referenced by Fetch().
|
private |
Definition at line 1710 of file eutils_client.cpp.
References CTime::eCurrent, eUnknown, fHTTP_AutoReconnect, g_CTimeoutToSTimeout(), CConn_HttpStream_Base::GetStatusCode(), kEmptyStr, m_Time, m_Timeout, m_Url, NCBI_THROW, NcbiStreamCopy(), x_BuildUrl(), and x_GetHostName().
Referenced by x_Fetch().
|
protected |
Definition at line 1055 of file eutils_client.cpp.
References CallWithRetry(), eUnknown, m_Time, m_Url, msg(), NCBI_THROW, x_AddAdditionalParameters(), and x_GetOnce().
Referenced by FetchHistory(), LinkHistory(), Search(), SearchHistory(), and SummaryHistory().
Definition at line 1010 of file eutils_client.cpp.
References _ASSERT, buf, ConnNetInfo_Create(), ConnNetInfo_Destroy(), ConnNetInfo_GetValue(), free(), fSERV_Dns, HOST_NAME_REFRESH_FREQ, info, m_CachedHostName, m_CachedHostNameCount, m_HostName, CSocketAPI::ntoa(), REG_CONN_HOST, SERV_ANYHOST, SERV_GetInfo(), and string.
Referenced by x_CountOnce(), x_FetchOnce(), x_GetOnce(), x_LinkOnce(), x_LinkOnceT(), x_LinkOutOnce(), x_SearchOnce(), and x_SummaryOnce().
|
private |
Definition at line 1077 of file eutils_client.cpp.
References CTime::eCurrent, eUnknown, fHTTP_AutoReconnect, g_CTimeoutToSTimeout(), CConn_HttpStream_Base::GetStatusCode(), kEmptyStr, m_Time, m_Timeout, m_Url, NCBI_THROW, NcbiStreamCopy(), ParseSearchResults(), x_BuildUrl(), and x_GetHostName().
Referenced by x_Get().
|
private |
Definition at line 599 of file eutils_client.cpp.
References DEFAULT_MAX_RETRIES, CTimeout::eDefault, ERR_POST, EUTILS_CLIENT_SECTION, NStr::fDecimalPosixOrLocal, CNcbiApplicationAPI::GetConfig(), IRegistry::GetString(), CIncreasingTime::Init(), CNcbiApplicationAPI::InstanceGuard(), m_MaxRetries, m_Timeout, m_WaitTime, s_WaitTimeParams, CTimeout::Set(), and NStr::StringToDouble().
Referenced by CEutilsClient().
|
protected |
Definition at line 1312 of file eutils_client.cpp.
References CallWithRetry(), command, eUnknown, m_Time, m_Url, NCBI_THROW, s_FormatIds(), NStr::URLEncode(), x_AddAdditionalParameters(), and x_LinkOnce().
|
protected |
Definition at line 1190 of file eutils_client.cpp.
References CallWithRetry(), command, eUnknown, m_Time, m_Url, NCBI_THROW, s_FormatIds(), NStr::URLEncode(), and x_AddAdditionalParameters().
Referenced by Link().
|
private |
Definition at line 1340 of file eutils_client.cpp.
References CTime::eCurrent, eUnknown, fHTTP_AutoReconnect, g_CTimeoutToSTimeout(), CConn_HttpStream_Base::GetStatusCode(), kEmptyStr, m_Time, m_Timeout, m_Url, NCBI_THROW, NcbiStreamCopy(), x_BuildUrl(), and x_GetHostName().
Referenced by x_Link().
|
private |
Definition at line 1222 of file eutils_client.cpp.
References CTime::eCurrent, ERR_POST, Error(), eUnknown, fHTTP_AutoReconnect, g_CTimeoutToSTimeout(), CConn_HttpStream_Base::GetStatusCode(), xml::error_messages::has_errors(), xml::error_messages::has_fatal_errors(), kEmptyStr, m_Attempt, m_LinkName, m_Time, m_Timeout, m_Url, NCBI_THROW, NcbiStreamCopy(), NStr::NumericToString(), xml::event_parser::parse_file(), xml::event_parser::parse_stream(), xml::error_messages::print(), CELinkParser< T >::SetLinkName(), x_BuildUrl(), and x_GetHostName().
|
protected |
Definition at line 1444 of file eutils_client.cpp.
References CallWithRetry(), cmd, eUnknown, m_Time, m_Url, NCBI_THROW, s_FormatIds(), NStr::URLEncode(), x_AddAdditionalParameters(), and x_LinkOutOnce().
Referenced by LinkOut().
|
private |
Definition at line 1469 of file eutils_client.cpp.
References CTime::eCurrent, eUnknown, fHTTP_AutoReconnect, g_CTimeoutToSTimeout(), CConn_HttpStream_Base::GetStatusCode(), kEmptyStr, LOG_POST, m_Time, m_Timeout, m_Url, NCBI_THROW, xml::document::swap(), Trace(), x_BuildUrl(), and x_GetHostName().
Referenced by x_LinkOut().
|
protected |
Definition at line 735 of file eutils_client.cpp.
References eUnknown, CESearchParser< T >::GetCount(), CEUtilsParser::GetErrors(), xml::error_messages::has_errors(), xml::error_messages::has_fatal_errors(), CEUtilsParser::HasError(), NStr::Join(), m_MessageHandler, msg(), NCBI_THROW, xml::event_parser::parse_stream(), xml::error_messages::print(), and CESearchParser< T >::ProcessMessages().
|
protected |
Definition at line 787 of file eutils_client.cpp.
References eUnknown, NCBI_THROW, and ParseSearchResults().
Referenced by ParseSearchResults().
|
protected |
Definition at line 834 of file eutils_client.cpp.
References CallWithRetry(), eUnknown, LOG_POST, m_RetMax, m_Time, m_Url, m_UrlTag, NCBI_THROW, NStr::NumericToString(), Trace(), NStr::URLEncode(), rapidjson::value, and x_AddAdditionalParameters().
Referenced by Search().
|
private |
Definition at line 873 of file eutils_client.cpp.
References count, CTime::eCurrent, ERR_POST, Error(), eUnknown, fHTTP_AutoReconnect, g_CTimeoutToSTimeout(), CConn_HttpStream_Base::GetStatusCode(), kEmptyStr, m_Attempt, m_Time, m_Timeout, m_Url, NCBI_THROW, NcbiStreamCopy(), NStr::NumericToString(), ParseSearchResults(), x_BuildUrl(), and x_GetHostName().
|
protected |
Definition at line 1530 of file eutils_client.cpp.
References CallWithRetry(), eUnknown, m_Time, m_Url, NCBI_THROW, s_FormatIds(), NStr::URLEncode(), dtl::version, x_AddAdditionalParameters(), and x_SummaryOnce().
Referenced by Summary().
|
private |
Definition at line 1558 of file eutils_client.cpp.
References CTime::eCurrent, eUnknown, fHTTP_AutoReconnect, g_CTimeoutToSTimeout(), CConn_HttpStream_Base::GetStatusCode(), kEmptyStr, LOG_POST, m_Time, m_Timeout, m_Url, NCBI_THROW, xml::document::swap(), Trace(), x_BuildUrl(), and x_GetHostName().
Referenced by x_Summary().
|
protected |
Definition at line 450 of file eutils_client.hpp.
Referenced by AddParameter(), ClearAddedParameters(), and x_AddAdditionalParameters().
|
private |
Definition at line 543 of file eutils_client.hpp.
Referenced by CallWithRetry(), x_LinkOnceT(), and x_SearchOnce().
|
mutableprotected |
Definition at line 447 of file eutils_client.hpp.
Referenced by x_GetHostName().
|
mutableprotected |
Definition at line 446 of file eutils_client.hpp.
Referenced by x_GetHostName().
|
protected |
Definition at line 448 of file eutils_client.hpp.
Referenced by x_GetHostName().
|
protected |
Definition at line 452 of file eutils_client.hpp.
Referenced by SetLinkName(), and x_LinkOnceT().
|
private |
Definition at line 541 of file eutils_client.hpp.
Referenced by CallWithRetry(), SetMaxRetries(), and x_InitParams().
|
protected |
Definition at line 445 of file eutils_client.hpp.
Referenced by SetMessageHandler(), SetMessageHandlerDefault(), SetMessageHandlerDiagPost(), SetMessageHandlerThrowOnError(), x_CountOnce(), and x_ParseSearchResults().
|
protected |
Definition at line 451 of file eutils_client.hpp.
Referenced by FetchHistory(), Search(), SearchHistory(), SetMaxReturn(), SummaryHistory(), and x_Search().
|
protected |
Definition at line 460 of file eutils_client.hpp.
Referenced by Count(), GetTime(), x_CountOnce(), x_Fetch(), x_FetchOnce(), x_Get(), x_GetOnce(), x_Link(), x_LinkOnce(), x_LinkOnceT(), x_LinkOut(), x_LinkOutOnce(), x_Search(), x_SearchOnce(), x_Summary(), and x_SummaryOnce().
|
private |
Definition at line 544 of file eutils_client.hpp.
Referenced by SetConnTimeout(), x_CountOnce(), x_FetchOnce(), x_GetOnce(), x_InitParams(), x_LinkOnce(), x_LinkOnceT(), x_LinkOutOnce(), x_SearchOnce(), and x_SummaryOnce().
|
protected |
Definition at line 456 of file eutils_client.hpp.
Referenced by Count(), GetUrl(), x_CountOnce(), x_Fetch(), x_FetchOnce(), x_Get(), x_GetOnce(), x_Link(), x_LinkOnce(), x_LinkOnceT(), x_LinkOut(), x_LinkOutOnce(), x_Search(), x_SearchOnce(), x_Summary(), and x_SummaryOnce().
|
protected |
Definition at line 449 of file eutils_client.hpp.
Referenced by Count(), SetUserTag(), and x_Search().
|
private |
Definition at line 542 of file eutils_client.hpp.
Referenced by CallWithRetry(), SetWaitTime(), and x_InitParams().