BLPAPI C++  3.24.11
EventQueue Class Reference

#include <blpapi_event.h>

Public Member Functions

 EventQueue ()
 
 EventQueue (const EventQueue &)=delete
 
EventQueueoperator= (const EventQueue &)=delete
 
virtual ~EventQueue ()
 
virtual Event nextEvent (int timeout=0)
 
virtual int tryNextEvent (Event *event)
 
virtual void purge ()
 
blpapi_EventQueue_thandle () const
 

Detailed Description

A construct used to handle replies to request synchronously.

An EventQueue can be supplied when using Session::sendRequest() and Session::sendAuthorizationRequest() methods.

When a request is submitted an application can either handle the responses asynchronously as they arrive or use an EventQueue to handle all responses for a given request or requests synchronously. The EventQueue will only deliver responses to the request(s) it is associated with.

See Component blpapi_event

Constructor & Destructor Documentation

◆ EventQueue() [1/2]

Construct an empty event queue.

◆ EventQueue() [2/2]

EventQueue ( const EventQueue )
delete

◆ ~EventQueue()

~EventQueue ( )
virtual

Destroy this event queue and cancel any pending request that are linked to this queue.

Member Function Documentation

◆ handle()

blpapi_EventQueue_t * handle ( ) const

◆ nextEvent()

Event nextEvent ( int  timeout = 0)
virtual

Returns the next Event available from the EventQueue. If the specified timeout is zero this will wait forever for the next event. If the specified timeout is non zero then if no Event is available within the specified timeout in milliseconds an Event with a type() of TIMEOUT will be returned.

◆ operator=()

EventQueue& operator= ( const EventQueue )
delete

◆ purge()

void purge ( )
virtual

Purges any Event objects in this EventQueue which have not been processed and cancel any pending requests linked to this EventQueue. The EventQueue can subsequently be re-used for a subsequent request.

◆ tryNextEvent()

int tryNextEvent ( Event event)
virtual

If the EventQueue is non-empty, load the next Event available into event and return 0 indicating success. If the EventQueue is empty, return a non-zero value with no effect on event or the the state of EventQueue. This method never blocks.


The documentation for this class was generated from the following file: