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 () |
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.
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.
channelName | The name of the channel to which we are going to listen. | |
cs | container services |
AcsJException |
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.
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.
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 | ( | ) |
String [] alma.acs.nc.CorbaReceiver.getEventType | ( | ) | [package] |
References alma.acs.nc.EventReceiver.eventTypeName.
Referenced by alma.acs.nc.CorbaReceiver.connect(), and alma.acs.nc.CorbaReceiver.disconnect().
StructuredProxyPushSupplier alma.acs.nc.CorbaReceiver.getProxySupplier | ( | ) | [package] |
References alma.acs.nc.Consumer.m_proxySupplier.
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.
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.