BLPAPI C++  3.24.8
ServiceRegistrationOptions Class Reference

#include <blpapi_providersession.h>

Public Types

enum  ServiceRegistrationPriority {
  PRIORITY_LOW = 0,
  PRIORITY_MEDIUM = INT_MAX / 2,
  PRIORITY_HIGH = INT_MAX
}
 
enum  RegistrationParts {
  PART_PUBLISHING = 0x2,
  PART_OPERATIONS = 0x4,
  PART_SUBSCRIBER_RESOLUTION = 0x8,
  PART_PUBLISHER_RESOLUTION = 0x10,
  PART_DEFAULT = 0x1
}
 

Public Member Functions

 ServiceRegistrationOptions ()
 
 ServiceRegistrationOptions (const ServiceRegistrationOptions &original)
 
 ~ServiceRegistrationOptions ()
 
ServiceRegistrationOptionsoperator= (const ServiceRegistrationOptions &rhs)
 
void setGroupId (const char *groupId, unsigned int groupIdLength)
 
int setServicePriority (int priority)
 
void setPartsToRegister (int parts)
 
void addActiveSubServiceCodeRange (int begin, int end, int priority)
 
void removeAllActiveSubServiceCodeRanges ()
 
int getGroupId (char *groupId, int *groupIdLength) const
 
int getServicePriority () const
 
int getPartsToRegister () const
 

Detailed Description

Contains the options which the user can specify when registering a service.

To use non-default options to registerService, create a ServiceRegistrationOptions instance and set the desired options and then supply it when using the registerService interface.

See Component blpapi_providersession

Member Enumeration Documentation

◆ RegistrationParts

Constants for specifying which part(s) of a service should be registered

Enumerator
PART_PUBLISHING 

register to receive subscribe and unsubscribe messages

PART_OPERATIONS 

register to receive the request types corresponding to each "operation" defined in the service metadata

PART_SUBSCRIBER_RESOLUTION 

register to receive resolution requests (with message type PermissionRequest) from subscribers

PART_PUBLISHER_RESOLUTION 

register to receive resolution requests (with message type PermissionRequest) from publishers (via ProviderSession::createTopics)

PART_DEFAULT 

register the parts of the service implied by options specified in the service metadata

◆ ServiceRegistrationPriority

Constants for specifying the priority to register services.

Service providers can use any non-negative value as a priority for more granular control.

Enumerator
PRIORITY_LOW 

Low priority (0)

PRIORITY_MEDIUM 

Medium priority (INT_MAX/2)

PRIORITY_HIGH 

High priority (INT_MAX)

Constructor & Destructor Documentation

◆ ServiceRegistrationOptions() [1/2]

Create ServiceRegistrationOptions with default options.

◆ ServiceRegistrationOptions() [2/2]

Copy Constructor

◆ ~ServiceRegistrationOptions()

Member Function Documentation

◆ addActiveSubServiceCodeRange()

void addActiveSubServiceCodeRange ( int  begin,
int  end,
int  priority 
)

Advertise the service to be registered to receive, with the specified priority, subscriptions that the resolver has mapped to a service code between the specified begin and the specified end values, inclusive. Numerically greater values of priority indicate higher priorities. The behavior of this function is undefined unless 0 <= begin <= end < (1 << 24), and priority is non-negative.

◆ getGroupId()

int getGroupId ( char *  groupId,
int *  groupIdLength 
) const

Copy the previously specified groupId at the memory location specified by groupId and the set the size of the groupId returned at groupIdLength. A Non-zero value indicates an error. The behavior is undefined if there is not enough space to copy the group Id to the specified buffer. Note that the groupId is not null terminated and buffer for groupId needs to be at most MAX_GROUP_ID_SIZE.

◆ getPartsToRegister()

int getPartsToRegister ( ) const

Return the parts of the service to be registered. See RegistrationParts, above for additional details.

◆ getServicePriority()

int getServicePriority ( ) const

Return the priority with which a service will be registered.

Note that the priority is used for both the publishing part and the operations part. it is not supported for resolution part.

◆ operator=()

Assign to this object the value of the specified rhs object.

◆ removeAllActiveSubServiceCodeRanges()

void removeAllActiveSubServiceCodeRanges ( )

Remove all previously added sub-service code ranges.

◆ setGroupId()

void setGroupId ( const char *  groupId,
unsigned int  groupIdLength 
)

Set the Group ID for the service to be registered to the specified char array beginning at groupId with size groupIdLength. If groupIdLength > MAX_GROUP_ID_SIZE (=64) only the first MAX_GROUP_ID_SIZE chars are considered as Group Id. Publishers with the same group id are treated as equivalent and will participate in load balancing given the same priority. Publishers with different group ids provide different subsets of the data and subscriptions will be established with one publisher from each group.

◆ setPartsToRegister()

void setPartsToRegister ( int  parts)

Set the parts of the service to be registered to the specified parts, which must be a bitwise-or of the options provided in RegistrationParts, above. This option defaults to RegistrationParts::PARTS_DEFAULT.

◆ setServicePriority()

int setServicePriority ( int  priority)

Set the priority with which a service will be registered to the specified priority, where numerically greater values of priority indicate higher priorities. The behavior is undefined unless priority is non-negative. Note that while the values of enum ServiceRegistrationPriority are suitable for use here, any non-negative priority is acceptable.

By default, a service will be registered with priority ServiceRegistrationPriority::PRIORITY_HIGH.

Note that this has no effect for resolution services.


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