Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

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 


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.

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.

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

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

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.

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.

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.

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

Returns the channel name.

Returns:
The channel name.

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.


Member Data Documentation

boolean alma::acs::nc::CorbaReceiver::isBegin [private]
 

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

ArrayList alma::acs::nc::CorbaReceiver::receivers [private]
 

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


The documentation for this class was generated from the following file:
Generated on Thu Apr 30 02:54:28 2009 for ACS Java API by doxygen 1.3.8