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

 


Channel::exists

CORBA IDL

boolean exists(in SubscriptionID subscription_id);

Parameter

subscription_id

The subscription identifier.

Exceptions

CORBA::BAD_PARAM

Indicates the following problem: Tobj_Events::INVALID_SUBSCRIPTION_ID

If the subscription_id is for a subscription created using the CosNotification Service API, this exception is always returned.

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

Description

Used by subscriber applications to determine if a subscription exists. Since the system administrator can delete subscriptions manually and the Notification Service can delete transient subscriptions automatically, a subscriber application might want to use this operation so that it can recreate the subscription, if necessary. The subscription_id used in this operation is the same one that you got when you subscribed.

Return Value

Returns Boolean True of the subscription exists and False if it does not.

Examples

C++ code example:

if channel->exists (subscription_id) {
// The subscription is still valid.
} else {
// The subscription no longer exists.
}

TOBJ_SimpleEvents::ChannelFactory Interface

The ChannelFactory interface is used to find event channels. This interface provides a single operation: find_channel.

The CORBA IDL for this interface:

module Tobj_SimpleEvents
{
typedef long ChannelID;
interface ChannelFactory
{
Channel find_channel(
in ChannelID channel_id // Must be DEFAULT_CHANNEL
);
};
};

 

Skip navigation bar  Back to Top Previous Next