NCBI C++ ToolKit
Classes | Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
CPSG_Reply Class Reference

Search Toolkit Book for CPSG_Reply

PSG reply – corresponds to a PSG request. More...

#include <objtools/pubseq_gateway/client/psg_client.hpp>

Classes

struct  SImpl
 

Public Member Functions

EPSG_Status GetStatus (CDeadline deadline) const
 Get the final result of this whole reply's retrieval. More...
 
SPSG_Message GetNextMessage (EDiagSev min_severity=eDiag_Error) const
 Unstructured text containing auxiliary info about the result – such as messages and errors that came from the PSG server or occured while trying to send request or to read and to process the reply. More...
 
shared_ptr< const CPSG_RequestGetRequest () const
 Get the request that resulted in this reply. More...
 
shared_ptr< CPSG_ReplyItemGetNextItem (CDeadline deadline)
 Get the next item which has started arriving from the server. More...
 
 ~CPSG_Reply ()
 

Private Member Functions

 CPSG_Reply ()
 

Private Attributes

unique_ptr< SImplm_Impl
 
shared_ptr< const CPSG_Requestm_Request
 

Friends

class CPSG_Queue
 

Detailed Description

PSG reply – corresponds to a PSG request.

It is used to retrieve data (accession resolution; bio-sequence; annotation blobs) from the storage.

Reply may contain:

Definition at line 1074 of file psg_client.hpp.

Constructor & Destructor Documentation

◆ ~CPSG_Reply()

CPSG_Reply::~CPSG_Reply ( )

Definition at line 1434 of file psg_client.cpp.

◆ CPSG_Reply()

CPSG_Reply::CPSG_Reply ( )
private

Definition at line 1395 of file psg_client.cpp.

Member Function Documentation

◆ GetNextItem()

shared_ptr< CPSG_ReplyItem > CPSG_Reply::GetNextItem ( CDeadline  deadline)

Get the next item which has started arriving from the server.

Note
Some of the item's data may still be in transit or not even sent in by the server yet.
Parameters
deadlineUntil what time to wait for the next item to start coming in.
Returns
  • The item objects from which you can start reading data
  • If no more items expected in the reply, the returned item will have type eEndOfReply
  • On expired timeout, the returned pointer will be empty (nullptr)
Exceptions
Ifan error has been detected.

Definition at line 1415 of file psg_client.cpp.

References assert, CPSG_ReplyItem::eEndOfReply, and m_Impl.

◆ GetNextMessage()

SPSG_Message CPSG_Reply::GetNextMessage ( EDiagSev  min_severity = eDiag_Error) const

Unstructured text containing auxiliary info about the result – such as messages and errors that came from the PSG server or occured while trying to send request or to read and to process the reply.

Parameters
min_severityMinimum severity level of messages to be retrieved.

Definition at line 1407 of file psg_client.cpp.

References assert, and m_Impl.

◆ GetRequest()

shared_ptr<const CPSG_Request> CPSG_Reply::GetRequest ( void  ) const
inline

Get the request that resulted in this reply.

Definition at line 1090 of file psg_client.hpp.

References m_Request.

◆ GetStatus()

EPSG_Status CPSG_Reply::GetStatus ( CDeadline  deadline) const

Get the final result of this whole reply's retrieval.

If the reply retrieval is not finalized by the deadline, then "eInProgress" is returned.

Definition at line 1400 of file psg_client.cpp.

References assert, m_Impl, and s_GetStatus().

Friends And Related Function Documentation

◆ CPSG_Queue

friend class CPSG_Queue
friend

Definition at line 1116 of file psg_client.hpp.

Member Data Documentation

◆ m_Impl

unique_ptr<SImpl> CPSG_Reply::m_Impl
private

Definition at line 1113 of file psg_client.hpp.

Referenced by GetNextItem(), GetNextMessage(), and GetStatus().

◆ m_Request

shared_ptr<const CPSG_Request> CPSG_Reply::m_Request
private

Definition at line 1114 of file psg_client.hpp.

Referenced by GetRequest().


The documentation for this class was generated from the following files:
Modified on Sun Apr 14 05:24:43 2024 by modify_doxy.py rev. 669887