#include <blpapi_service.h>
List of all members.
Detailed Description
Defines a service which provides access to API data.
A Service object is obtained from a Session and contains the Operations (each of which contains its own schema) and the schema for Events which this Service may produce. A Service object is also used to create Request objects used with a Session to issue requests.
All API data is associated with a service. Before accessing API data using either request-reply or subscription, the appropriate Service must be opened and, if necessary, authorized.
Provider services are created to generate API data and must be registered before use.
The Service object is a handle to the underlying data which is owned by the Session. Once a Service has been successfully opened in a Session it remains accessible until the Session is terminated.
Constructor & Destructor Documentation
blpapi::Service::Service |
( |
|
) |
|
Create an uninitialized Service. The only valid operations on an uninitialized Service are assignment, isValid() and destruction.
Assume ownership of the raw handle
blpapi::Service::Service |
( |
const Service & |
original |
) |
|
blpapi::Service::~Service |
( |
|
) |
|
Destructor. Destroying a Service object obtained from a Session does not close the underlying service.
Member Function Documentation
Request blpapi::Service::createRequest |
( |
const char * |
operation |
) |
const |
Returns a empty Request object for the specified operation
. If operation
does not identify a valid operation in the Service then an exception is thrown.
An application must populate the Request before issuing it using Session::sendRequest().
Request blpapi::Service::createAuthorizationRequest |
( |
const char * |
authorizationOperation = 0 |
) |
const |
Returns an empty Request object for the specified authorizationOperation
. If the authorizationOperation
does not identify a valid operation for this Service then an exception is thrown.
An application must populate the Request before issuing it using Session::sendAuthorizationRequest().
const char* blpapi::Service::name |
( |
|
) |
const |
Returns a pointer to a null-terminated, read-only string which contains the name of this Service. The pointer remains valid until this Service object is destroyed.
const char* blpapi::Service::description |
( |
|
) |
const |
Returns a pointer to a null-terminated, read-only string which contains a human-readable description of this Service. The pointer remains valid until this Service object is destroyed.
size_t blpapi::Service::numOperations |
( |
|
) |
const |
Returns the number of Operations defined by this Service.
bool blpapi::Service::hasOperation |
( |
const char * |
name |
) |
const |
Returns true if the specified name
identifies a valid Operation in this Service. Otherwise returns false.
bool blpapi::Service::hasOperation |
( |
const Name & |
name |
) |
const |
Returns true if the specified name
identifies a valid Operation in this Service. Otherwise returns false.
Operation blpapi::Service::getOperation |
( |
size_t |
index |
) |
const |
Returns the specified index
th Operation in this Service. If index
>=numOperations() then an exception is thrown.
Operation blpapi::Service::getOperation |
( |
const char * |
name |
) |
const |
Return the definition of the Operation identified by the specified name
. If this Service does not define an operation name
an exception is thrown.
Operation blpapi::Service::getOperation |
( |
const Name & |
name |
) |
const |
Return the definition of the Operation having the specified name
. Throw exception if no such Operation exists in this service.
int blpapi::Service::numEventDefinitions |
( |
|
) |
const |
Returns the number of unsolicited events defined by this Service.
bool blpapi::Service::hasEventDefinition |
( |
const char * |
name |
) |
const |
Returns true if the specified name
identifies a valid event in this Service.
bool blpapi::Service::hasEventDefinition |
( |
const Name & |
name |
) |
const |
Returns true if the specified name
identifies a valid event in this Service.
Returns the SchemaElementDefinition of the specified index
th unsolicited event defined by this service. If index
>=numEventDefinitions() an exception is thrown.
Return the SchemaElementDefinition of the unsolicited event defined by this Service identified by the specified name
. If this Service does not define an unsolicited event name
an exception is thrown.
Return the definition of the unsolicited message having the specified name
defined by this service. Throw exception of the no unsolicited message having the specified name
is defined by this service.
const char* blpapi::Service::authorizationServiceName |
( |
|
) |
const |
Returns the name of the Service which must be used in order to authorize access to restricted operations on this Service. If no authorization is required to access operations on this service an empty string is returned. Authorization services never require authorization to use.
bool blpapi::Service::isValid |
( |
|
) |
const |
Returns true if this Service is valid. That is, it was returned from a Session.
std::ostream& blpapi::Service::print |
( |
std::ostream & |
stream, |
|
|
int |
level = 0 , |
|
|
int |
spacesPerLevel = 4 | |
|
) |
| | const |
Format this Service schema to the specified output stream
at (absolute value specified for) the optionally specified indentation level
and return a reference to stream
. If level
is specified, optionally specify spacesPerLevel
, the number of spaces per indentation level for this and all of its nested objects. If level
is negative, suppress indentation of the first line. If spacesPerLevel
is negative, format the entire output on one line, suppressing all but the initial indentation (as governed by level
).
The documentation for this class was generated from the following file: