blpapi.ServiceRegistrationOptions
- class blpapi.ServiceRegistrationOptions
Contains the options which can be specified when registering a service.
To use non-default options to
registerService()
, create aServiceRegistrationOptions
instance and set the required options and then supply it when using theregisterService()
interface.The following attributes represent service registration priorities:
The following attributes represent the registration parts:
- PART_DEFAULT = 1
Register the parts of the service implied by options specified in the service metadata
- PART_OPERATIONS = 4
Register to receive the request types corresponding to each “operation” defined in the service metadata
- PART_PUBLISHER_RESOLUTION = 16
Register to receive resolution requests (with message type
PermissionRequest
) from publishers (viaProviderSession.createTopics()
)
- PART_PUBLISHING = 2
Register to receive subscribe and unsubscribe messages
- PART_SUBSCRIBER_RESOLUTION = 8
Register to receive resolution requests (with message type
PermissionRequest
) from subscribers
- PRIORITY_HIGH = 2147483647
- PRIORITY_LOW = 0
- PRIORITY_MEDIUM = 1073741823
- __init__()
Create
ServiceRegistrationOptions
with default options.
- addActiveSubServiceCodeRange(begin, end, priority)
- Parameters:
Advertise the service to be registered to receive, with the specified
priority
, subscriptions that the resolver has mapped to a service code between the specifiedbegin
and the specifiedend
values, inclusive. Numerically greater values ofpriority
indicate higher priorities.- Return type:
Note
The behavior of this function is undefined unless
0 <= begin <= end < (1 << 24)
, andpriority
is non-negative.
- getPartsToRegister()
- Return type:
- Returns:
The parts of the service to be registered.
Registration parts are enumerated in the class docstring.
- getServicePriority()
- Return type:
- Returns:
The value of the priority for subscription services in this instance.
- removeAllActiveSubServiceCodeRanges()
Remove all previously added sub-service code ranges.
- Return type:
- setGroupId(groupId)
Set the Group ID for the service to be registered.
- Parameters:
groupId (
str
) – The group ID for the service to be registered
Set the Group ID for the service to be registered to the specified
groupId
string. IfgroupId
length is greater thanMAX_GROUP_ID_SIZE
(=64) only the firstMAX_GROUP_ID_SIZE
chars are considered as Group Id.- Return type:
- setPartsToRegister(parts)
Set the parts of the service to be registered.
- Parameters:
parts (
int
) – Parts of the service to be registered.
Set the parts of the service to be registered to the specified
parts
, which must be a bitwise-or of the options provided in “registration parts” options (enumerated in the class docstring). This option defaults toPART_DEFAULT
.- Return type:
- setServicePriority(priority)
Set the priority with which a subscription service will be registered.
- Parameters:
priority (
int
) – The service priority
Set the priority with which a subscription service will be registered to the specified
priority
, where numerically greater values ofpriority
indicate higher priorities. The behavior is undefined unlesspriority
is non-negative. Note that while the values pre-defined inServiceRegistrationOptions
are suitable for use here, any non-negativepriority
is acceptable.By default, a service will be registered with priority
PRIORITY_HIGH
.Note this has no effect for resolution services.
- Return type: