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

Synopsis

Sets the filter object on the subscriber's callback object.

OMG IDL

add_filter(
in Filter new_filter
);

Exceptions

CORBA::IMP_LIMIT

Indicates one of the following problems:

Tobj_Notification::SUB_MULTIPLE_CALLS_TO_SET_FILTER

Tobj_Notification::SUB_ADD_FILTER_AFTER_CONNECT

Tobj_Notification::SUB_NIL_FILTER_REF

Tobj_Notification::SUB_NO_CUSTOM_FILTERS

CORBA::OBJECT_NOT_EXIST

Indicates that the subscription does not exist.

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 filter object to the subscriber's callback object. If the application using this operation will be shut down and restarted, the filter_id should be written to persistent storage.

Note: This operation: (1) cannot be called after the subscriber callback object is connected (see connect_structured_push_consumer above), (2) cannot be called more than once, and (3) when it is called, the filter constraint expression must already be present in the filter (see CosNotifyFilter::Filter add_constraints).

Note: Only filters created by the event channel's default filter factory can be added.

Return Value

Returns a filter_id.

Examples

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

C++ code example:

CosNotifyFilter::FilterID filter_id =
subscription->add_filter(filter.in());

 

Skip navigation bar  Back to Top Previous Next