alma::acs::nc::CorbaNotificationChannel Class Reference

Inheritance diagram for alma::acs::nc::CorbaNotificationChannel:
Inheritance graph
[legend]
Collaboration diagram for alma::acs::nc::CorbaNotificationChannel:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 CorbaNotificationChannel (String inChannelName, ContainerServicesBase cs) throws AcsJException
 CorbaNotificationChannel (SimpleSupplier inCorbaPublisher, ContainerServicesBase cs) throws AcsJException
Publisher getPublisher ()
void attach (String eventTypeName, Object receiver)
void detach (String eventTypeName, Object receiver)
void begin ()
void end ()
void publish (IDLEntity event) throws AcsJException
void deactivate () throws AcsJException

Static Public Member Functions

static Receiver getCorbaReceiver (String channelName, ContainerServicesBase cs)

Static Public Attributes

static final String ALMA_DOMAIN = "ALMA"

Private Attributes

SimpleSupplier corbaPublisher
CorbaReceiver corbaReceiver

Detailed Description

The CorbaNotificationChannel class implements the notification channel concepts using a CORBA-based approach that employs the CORBA notification services.

: Remove inheritance from AbstractNotificationChannel, see COMP-1786

Version:
1.00 Apr 10, 2003
Author:
Allen Farris

Constructor & Destructor Documentation

alma::acs::nc::CorbaNotificationChannel::CorbaNotificationChannel ( String  inChannelName,
ContainerServicesBase  cs 
) throws AcsJException [inline]

Create a CORBA Notification Channel.

Parameters:
inChannelName The name of this channel.
cs container services
Exceptions:
AcsJException 

References corbaPublisher, and corbaReceiver.

alma::acs::nc::CorbaNotificationChannel::CorbaNotificationChannel ( SimpleSupplier  inCorbaPublisher,
ContainerServicesBase  cs 
) throws AcsJException [inline]

Create a CORBA Notification Channel and specify the CorbaPublisher being used.

Parameters:
inCorbaPublisher The CORBA publisher object.
cs Container services reference

References alma::acs::nc::AbstractNotificationChannel::channelName, corbaPublisher, and corbaReceiver.


Member Function Documentation

void alma::acs::nc::CorbaNotificationChannel::attach ( String  eventTypeName,
Object  receiver 
) [inline]

Attach a Receiver, that receives one type of event, to this notification channel. The receiver is required to have a public method called "receive(EventType)", that receives and processes the event. The EventType parameter in the method signature is the name of an IDL structure that defines the event.

Parameters:
eventTypeName The name of the event type that this receiver wishes to receive.
receiver An object that receives and processes this event. It must have a public method of the form "receive(EventType)", where the EventType parameter in the method signature is the name of an IDL structure that defines the event.

Implements alma::acs::nc::Receiver.

References alma::acs::nc::CorbaReceiver::attach(), and corbaReceiver.

void alma::acs::nc::CorbaNotificationChannel::begin (  )  [inline]

Connect this corbaReceiver to the notification channel. At this point the objects that have been attached begin receiving events. This method must be called or no events will be recieved.

Implements alma::acs::nc::Receiver.

References alma::acs::nc::CorbaReceiver::begin(), and corbaReceiver.

void alma::acs::nc::CorbaNotificationChannel::deactivate (  )  throws AcsJException [inline, virtual]

Deactivate this notification channel. The publisher gets disconnected and then the channel is destroyed.

Exceptions:
AcsJException 

Implements alma::acs::nc::AbstractNotificationChannel.

References corbaPublisher, corbaReceiver, alma::acs::nc::SimpleSupplier::destroyNotificationChannel(), alma::acs::nc::CorbaReceiver::disconnect(), and alma::acs::nc::SimpleSupplier::disconnect().

Referenced by alma::demo::test::AbstractNC::NCPublisherImpl::cleanUp().

void alma::acs::nc::CorbaNotificationChannel::detach ( String  eventTypeName,
Object  receiver 
) [inline]

Detach an eventType/Receiver from this notification channel. Only the specified event type is detached for the specified receiver.

Parameters:
eventTypeName The name of the event type that this receiver receives.
receiver The object that receives and processes this event.

Implements alma::acs::nc::Receiver.

References corbaReceiver, and alma::acs::nc::CorbaReceiver::detach().

void alma::acs::nc::CorbaNotificationChannel::end (  )  [inline]

Disconnect this reciever from the notification channel. All objects that have been recieving events are removed and no further events are received.

Implements alma::acs::nc::Receiver.

References corbaReceiver, and alma::acs::nc::CorbaReceiver::end().

static Receiver alma::acs::nc::CorbaNotificationChannel::getCorbaReceiver ( String  channelName,
ContainerServicesBase  cs 
) [inline, static]

Get the Receiver interface to a currently created CORBA channel.

Parameters:
channelName The name of the requested channel.
cs container services
Returns:
A Receiver interface to the specified channel or null if the channel does not exist.
Publisher alma::acs::nc::CorbaNotificationChannel::getPublisher (  )  [inline, virtual]

Get the Publisher interface to a currently created CORBA channel. Only the creator of the channel can provide a Publisher interface.

Returns:
A Publisher interface to thisd channel.

Implements alma::acs::nc::AbstractNotificationChannel.

void alma::acs::nc::CorbaNotificationChannel::publish ( IDLEntity  event  )  throws AcsJException [inline]

Publish an event on this notification channel.

Parameters:
event The event must be an IDL structure.
Exceptions:
AcsJException 

Implements alma::acs::nc::Publisher.

References corbaPublisher, and alma::acs::nc::SimpleSupplier::publishEvent().

Referenced by alma::demo::test::AbstractNC::NCPublisherImpl::publish().


Member Data Documentation

The ALMA domain name, which is not explicitly used and is hidden from the application.

The CORBA publisher object that is used to create, access, and publish events on the CORBA channel.

Referenced by CorbaNotificationChannel(), deactivate(), and publish().

The CORBA receiver object that is used to attach and detach receivers of events.

Referenced by attach(), begin(), CorbaNotificationChannel(), deactivate(), detach(), and end().


The documentation for this class was generated from the following file:

Generated by  doxygen 1.6.2