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::ConsumerAdmin::
obtain_notification_push_supplier

Synopsis

Creates proxy push supplier objects.

OMG IDL

ProxySupplier obtain_notification_push_supplier (
in ClientType ctype,
out ProxyID proxy_id)
raises ( AdminLimitExceeded )

Exceptions

CosNotifyChannelAdmin::AdminLimitExceeded

Never raised.

CORBA::IMP_LIMIT

Indicates the following problem:

Tobj_Notification::SUB_UNSUPPORTED_CLIENT_TYPE

Description

Used when subscribing. This operation is used in subscriber applications to create proxy push supplier objects. Only structured events are supported (that is, ANY_EVENT and SEQUENCE_EVENT ClientTypes are not supported). Therefore, the ClientType input parameter must be set to CosNotifyComm::STRUCTURED_EVENT. If you shut down and restart the subscriber and subscription survives more than one run of your program, the ProxyID returned by this operation should be durably stored. The subscriber must narrow the proxy supplier to CosNotifyChannelAdmin::StructuredProxyPushSupplier. All required operations must be completed in five minutes.

Note: Notification Service applications that start and shut down only once can use the proxy_id to determine if their subscription has been cancelled automatically or by the system administrator.

Return Value

This operation returns the new proxy's object reference. The new proxy_id is also returned through the proxy_id out parameter.

Examples

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

C++ code example:

CosNotifyChannelAdmin::ProxySupplier_var generic_proxy =
consumer_admin->obtain_notification_push_supplier(
CosNotifyChannelAdmin::STRUCTURED_EVENT,
proxy_id
);

CosNotifyChannelAdmin::StructuredProxyPushSupplier_var proxy =
CosNotifyChannelAdmin::StructuredProxyPushSupplier::_narrow(
generic_proxy.in ()
);


 

 

Skip navigation bar  Back to Top Previous Next