Skip navigation.

Using the CORBA Notification Service

  Previous Next vertical dots separating previous/next from contents/index/pdf Contents Index View as PDF   Get Adobe Reader

 


CosNotifyChannelAdmin::StructuredProxyPushSupplier::set_qos

Synopsis

Sets the QoS for the subscription.

OMG IDL

void set_qos(in QoSProperties qos)
raises (UnsupportedQoS);

Exceptions

UnsupportedQoS

Never raised.

ORBA::IMP_LIMIT

Indicates one of the following problems:

Tobj_Notification::SUB_MULTIPLE_CALLS_TO_SET_QOS

Tobj_Notification::SUB_CANT_SET_QOS_AFTER_CONNECT

Tobj_Notification::SUBSCRIPTION_DOESNT_EXIST

Tobj_Notification::SUB_UNSUPPORTED_QOS_VALUE

Note: For more information on exceptions and corresponding minor codes, see "Exception Minor Codes" on page -59.

Description

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.

Examples

Note: Code examples shown here are abbreviated. For complete code examples, see "Creating a Subscription" on page -11.

C++ code example:

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);

 

Skip navigation bar  Back to Top Previous Next