Public Member Functions

blpapi::EventDispatcher Class Reference

#include <blpapi_eventdispatcher.h>

List of all members.

Public Member Functions

 EventDispatcher (size_t numDispatcherThreads=1)
 ~EventDispatcher ()
int start ()
int stop (bool async=false)
blpapi_EventDispatcher_timpl () const

Detailed Description

Dispatches events from one or more Sessions through callbacks

EventDispatcher objects are optionally specified when Session objects are constructed. A single EventDispatcher can be shared by multiple Session objects.

The EventDispatcher provides an event-driven interface, generating callbacks from one or more internal threads for one or more sessions.


Constructor & Destructor Documentation

blpapi::EventDispatcher::EventDispatcher ( size_t  numDispatcherThreads = 1  ) 

Construct an EventDispatcher with the specified numDispatcherThreads. If numDispatcherThreads is 1 (the default) then a single internal thread is created to dispatch events. If numDispatcherThreads is greater than 1 then an internal pool of numDispatcherThreads threads is created to dispatch events. The behavior is undefined if numDispatcherThreads is 0.

blpapi::EventDispatcher::~EventDispatcher (  ) 

Destructor.


Member Function Documentation

int blpapi::EventDispatcher::start (  ) 

Start generating callbacks for events from sessions associated with this EventDispatcher. Return 0 on success and a non zero value otherwise.

int blpapi::EventDispatcher::stop ( bool  async = false  ) 

Shutdown this event dispatcher object and stop generating callbacks for events from sessions associated with it. If the specified async is false (the default) then this method blocks until all current callbacks which were dispatched through this EventDispatcher have completed. Return 0 on success and a non zero value otherwise.

Note: Calling stop with async of false from within a callback dispatched by this EventDispatcher is undefined and may result in a deadlock.

blpapi_EventDispatcher_t* blpapi::EventDispatcher::impl (  )  const

Returns the internal implementation.


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