alma::acs::nc::CorbaReceiver Class Reference

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

List of all members.

Public Member Functions

String getChannelName ()
void connect ()
void disconnect ()
void push_structured_event (StructuredEvent event)
void attach (String eventTypeName, Object receiver)
void detach (String eventTypeName, Object receiver)
void begin ()
void end ()

Package Functions

 CorbaReceiver (String channelName, ContainerServicesBase cs) throws AcsJException
StructuredProxyPushSupplier getProxySupplier ()
String[] getEventType ()

Private Attributes

ArrayList receivers
boolean isBegin

Detailed Description

The CorbaReceiver class implements those methods needed to craft an object that receives and processes events from a CORBA notification channel. It is intended for use within a CorbaNotificationChannel, in conjunction with the attach and detach methods.

Version:
1.00 Apr 10, 2003
Author:
Allen Farris

Constructor & Destructor Documentation

alma::acs::nc::CorbaReceiver::CorbaReceiver ( String  channelName,
ContainerServicesBase  cs 
) throws AcsJException [inline, package]

Create a CORBA receiver object. The CORBA receiver object is only created. Nothing actually happens until the "connect" method is executed. One must use the static method "getCorbaReceiver" in the CorbaNotificationChannel class to create such an object.

Parameters:
channelName The name of the channel to which we are going to listen.
cs container services
Exceptions:
AcsJException 

References isBegin, and receivers.


Member Function Documentation

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

Attach an event receiver object 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 full path 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.

TODO change here as above

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

References alma::acs::nc::Consumer::addSubscription(), alma::acs::nc::EventReceiver::eventTypeName, isBegin, alma::acs::nc::EventReceiver::receiver, and receivers.

Referenced by alma::acs::nc::CorbaNotificationChannel::attach().

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

The begin() method must be called to initiate the process of receiving events. 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 connect(), and isBegin.

Referenced by alma::acs::nc::CorbaNotificationChannel::begin().

void alma::acs::nc::CorbaReceiver::connect (  )  [inline]

Connect this CORBA receiver to its CORBA channel to begin receiving events.

References alma::acs::nc::Consumer::addSubscription(), alma::acs::nc::Consumer::consumerReady(), and getEventType().

Referenced by begin().

void alma::acs::nc::CorbaReceiver::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 alma::acs::nc::EventReceiver::eventTypeName, isBegin, alma::acs::nc::EventReceiver::receiver, receivers, and alma::acs::nc::Consumer::removeSubscription().

Referenced by alma::acs::nc::CorbaNotificationChannel::detach().

void alma::acs::nc::CorbaReceiver::disconnect (  )  [inline]

Disconnect this CORBA receiver from its CORBA channel. No events are received after this method is executed.

Reimplemented from alma::acs::nc::Consumer.

References getEventType(), and alma::acs::nc::Consumer::removeSubscription().

Referenced by alma::demo::test::AbstractNC::NCReceiverImpl::cleanUp(), alma::acs::nc::CorbaNotificationChannel::deactivate(), and end().

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

Stop all events from being processed by the attached Receiver objects. All objects that have been recieving events are removed and no further events are received.

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

References disconnect(), isBegin, and receivers.

Referenced by alma::acs::nc::CorbaNotificationChannel::end().

String alma::acs::nc::CorbaReceiver::getChannelName (  )  [inline]

Returns the channel name.

Returns:
The channel name.

References alma::acs::nc::Consumer::m_channelName.

String [] alma::acs::nc::CorbaReceiver::getEventType (  )  [inline, package]
StructuredProxyPushSupplier alma::acs::nc::CorbaReceiver::getProxySupplier (  )  [inline, package]
void alma::acs::nc::CorbaReceiver::push_structured_event ( StructuredEvent  event  )  [inline]

This is the required CORBA method used to actually process the events requested by this receiver. It is automatically called by the notification service.

Parameters:
event The event to be received and processed.

Reimplemented from alma::acs::nc::Consumer.

References alma::acs::nc::EventReceiver::eventTypeName, alma::acs::nc::EventReceiver::receiver, and receivers.


Member Data Documentation

Designates whether a begin() method has been called or not.

Referenced by attach(), begin(), CorbaReceiver(), detach(), and end().

The list of receiver objects that process received events. The items on this list are all of type EventReceiver.

Referenced by attach(), CorbaReceiver(), detach(), end(), getEventType(), and push_structured_event().


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

Generated by  doxygen 1.6.2