Using the CORBA Notification Service
Sets the QoS for the subscription.
void set_qos(in QoSProperties qos)
raises (UnsupportedQoS);
Note: For more information on exceptions and corresponding minor codes, see "Exception Minor Codes" on page -59.
Used when subscribing. This operation is used in subscriber applications to set the QoS for the subscription. It takes as an input parameter a sequence of name-value pairs which encapsulates quality-of-service property settings that the subscriber is requesting.
There are two components of the QoS: the subscription type and the subscription name. The subscription type is set by constructing a name-value pair where the name is Tobj_Notification::SUBSCRIPTION_TYPE
and the value is either Tobj_Notification::PERSISTENT_SUBSCRIPTION
, or Tobj_Notification::TRANSIENT_SUBSCRIPTION
. For more information and additional usage details, see "Quality of Service" on page -2.
The subscription name is set by constructing a name-value pair, where the name is Tobj_Notification::SUBSCRIPTION_NAME
, and the value is a user-defined string.
For more information on this parameter, see "Parameters Used When Creating Subscriptions" on page -11.
Note: Code examples shown here are abbreviated. For complete code examples, see "Creating a Subscription" on page -11.
CosNotification::QoSProperties qos;
qos.length(2);
qos[0].name =
CORBA::string_dup(Tobj_Notification::SUBSCRIPTION_NAME);
qos[0].value <<= "MySubsription";
qos[1].name =
CORBA::string_dup(Tobj_Notification::SUBSCRIPTION_TYPE);
qos[1].value <<=
Tobj_Notification::TRANSIENT_SUBSCRIPTION;
subscription->set_qos(qos);