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:: connect_structured_push_consumer

Synopsis

Completes a subscription.

OMG IDL

void connect_structured_push_consumer (
in CosNotifyComm::StructuredPushConsumer push_consumer)
raises(CosEventChannelAdmin::AlreadyConnected,
CosEventChannelAdmin::TypeError );

Exceptions

CosEventChannelAdmin::TypeError

Never raised.

CORBA::INV_OREF

Tobj_Events::SUB_NIL_CALLBACK_REF

CORBA::IMP_LIMIT

Indicates one of the following problems:

Tobj_Events::SUB_DOMAIN_AND_TYPE_TOO_LONG

Tobj_Events::SUB_NAME_TO_LONG

Tobj_Events::TRANSIENT_ONLY_CONFIGURATION

Tobj_Notification::SUBSCRIPTION_DOESNT_EXIST.

CORBA::OBJECT_NOT_EXIST

The proxy does not exist.

CosEventChannelAdmin::AlreadyConnected

Indicates that the connect_structured_push_consumer operation has already been invoked.

Note: For exception definitions and corresponding minor codes, see "Exception Minor Codes" on page -59.

Description

Use this operation when subscribing. This operation is used in subscriber applications to subscribe to events. The push_consumer parameter identifies the subscriber's callback object.

Once the connect_structured_push_consumer has been called, the Notification Service will proceed to send events to the subscriber by invoking the callback object's push_structured_event operation. If the connect_structured_push_consumer has already been called, the AlreadyConnected exception is raised.

Note: You must call set_qos and add_filter before calling connect_structured_push_consumer.

Examples

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

C++ code example:

subscription->connect_structured_push_consumer(
news_consumer.in()
);

 

Skip navigation bar  Back to Top Previous Next