Public Member Functions | Package Functions

alma.acs.nc.CorbaReceiver Class Reference

Inheritance diagram for alma.acs.nc.CorbaReceiver:
alma.acs.nc.Consumer alma.acs.nc.Receiver alma.acs.nc.ReconnectableSubscriber

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 ()

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
Deprecated:
since ACS 9.0, see http://jira.alma.cl/browse/COMP-4716

Constructor & Destructor Documentation

alma.acs.nc.CorbaReceiver.CorbaReceiver ( String  channelName,
ContainerServicesBase  cs 
) throws AcsJException [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 
)

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, and alma.acs.nc.EventReceiver.receiver.

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

void alma.acs.nc.CorbaReceiver.begin (  ) 

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 alma.acs.nc.CorbaReceiver.connect().

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

void alma.acs.nc.CorbaReceiver.connect (  ) 

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

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

Referenced by alma.acs.nc.CorbaReceiver.begin().

void alma.acs.nc.CorbaReceiver.detach ( String  eventTypeName,
Object  receiver 
)

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, alma.acs.nc.EventReceiver.receiver, and alma.acs.nc.Consumer.removeSubscription().

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

void alma.acs.nc.CorbaReceiver.disconnect (  ) 

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

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

Referenced by alma.acs.nc.CorbaNotificationChannel.deactivate(), and alma.acs.nc.CorbaReceiver.end().

void alma.acs.nc.CorbaReceiver.end (  ) 

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 alma.acs.nc.CorbaReceiver.disconnect().

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

String alma.acs.nc.CorbaReceiver.getChannelName (  ) 

Returns the channel name.

Returns:
The channel name.

References alma.acs.nc.Consumer.m_channelName.

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

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.

References alma.acs.nc.EventReceiver.eventTypeName, alma.acs.nc.Consumer.getNotificationFactoryName(), alma.acs.nc.Consumer.m_channelName, alma.acs.nc.Consumer.m_logger, and alma.acs.nc.EventReceiver.receiver.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties