org.gcube.common.core.informationsystem.notifier
Interface ISNotifier


public interface ISNotifier

Defines the local interface to the subscription/notification mechanism of an Information System in a gCube infrastructure.

Author:
Manuele Simi(ISTI-CNR)

Nested Class Summary
static class ISNotifier.BaseNotificationConsumer
          Base implementation of a GCUBEConsumer.
static class ISNotifier.GCUBENotificationTopic
           
static class ISNotifier.NotificationEvent
          Generic GCUBEEvent for notification.
static class ISNotifier.NotificationMessage
          Delivered Notification
static class ISNotifier.NotificationTopic
          A ISNotifier.NotificationTopic for lifetime events .
static class ISNotifier.TopicData
          Topic registration data
 
Method Summary
 boolean[] isTopicRegistered(GCUBESecurityManager securityManager, GCUBEScope scope, List<ISNotifier.TopicData> topics)
          Checks if the producer registration is completed for a list of given topics
 void registerISNotification(org.apache.axis.message.addressing.EndpointReferenceType producerEPR, List<? extends org.globus.wsrf.Topic> notifications, GCUBESecurityManager manager, GCUBEScope... scope)
          Registers a list of topics as IS Notifications
<T extends ISNotifier.BaseNotificationConsumer>
void
registerToISNotification(T consumer, List<ISNotifier.GCUBENotificationTopic> notifications, GCUBESecurityManager manager, GCUBEScope... scope)
          Registers the consumer to the given list of topics
 void unregisterFromISNotification(GCUBESecurityManager manager, List<ISNotifier.GCUBENotificationTopic> notifications, GCUBEScope... scope)
          Unregisters the consumer from the given list of topics
 void unregisterISNotification(org.apache.axis.message.addressing.EndpointReferenceType producerEPR, List<? extends org.globus.wsrf.Topic> notifications, GCUBESecurityManager manager, GCUBEScope... scope)
          Unregisters a list of new topics as source of IS Notifications
 

Method Detail

registerToISNotification

<T extends ISNotifier.BaseNotificationConsumer> void registerToISNotification(T consumer,
                                                                              List<ISNotifier.GCUBENotificationTopic> notifications,
                                                                              GCUBESecurityManager manager,
                                                                              GCUBEScope... scope)
                              throws ISNotifierException
Registers the consumer to the given list of topics

Parameters:
notifications - the list of GCUBENotificationTopic to register to
consumer - the ISNotifier.BaseNotificationConsumer to callback whenever a notification is received
manager - the GCUBESecurityManager of the consumer
scope - the GCUBEScopes in which to register the consumer, it is used instead of the one included in the context
Throws:
ISNotifierException - if the registration fails

unregisterFromISNotification

void unregisterFromISNotification(GCUBESecurityManager manager,
                                  List<ISNotifier.GCUBENotificationTopic> notifications,
                                  GCUBEScope... scope)
                                  throws ISNotifierException
Unregisters the consumer from the given list of topics

Parameters:
notifications - the list of IS Notifications from which to unregister the EndpointReferenceType
manager - the GCUBESecurityManager of the consumer
scope - the GCUBEScopes in which to register the consumer, replacing the one included in the context
Throws:
ISNotifierException - if the unregistration fails

registerISNotification

void registerISNotification(org.apache.axis.message.addressing.EndpointReferenceType producerEPR,
                            List<? extends org.globus.wsrf.Topic> notifications,
                            GCUBESecurityManager manager,
                            GCUBEScope... scope)
                            throws ISNotifierException
Registers a list of topics as IS Notifications

Parameters:
producerEPR - the GCUBEServiceContext of the producer
notifications - the list of IS Notifications to register
manager - the GCUBESecurityManager of the producer
scope - the GCUBEScopes in which to register the IS notification, it is used instead of the one included in the context
Throws:
ISNotifierException - if the registration fails

unregisterISNotification

void unregisterISNotification(org.apache.axis.message.addressing.EndpointReferenceType producerEPR,
                              List<? extends org.globus.wsrf.Topic> notifications,
                              GCUBESecurityManager manager,
                              GCUBEScope... scope)
                              throws ISNotifierException
Unregisters a list of new topics as source of IS Notifications

Parameters:
producerEPR - the EndpointReferenceType of the producer
notifications - the list of IS Notification to unregister
manager - the GCUBESecurityManager of the producer
scope - the GCUBEScopes in which to unregister the IS notification, it is used instead of the one included in the context
Throws:
ISNotifierException - if the unregistration fails

isTopicRegistered

boolean[] isTopicRegistered(GCUBESecurityManager securityManager,
                            GCUBEScope scope,
                            List<ISNotifier.TopicData> topics)
                            throws ISNotifierException
Checks if the producer registration is completed for a list of given topics

Parameters:
manager - the GCUBESecurityManager of the producer
scope - the GCUBEScopes in which to register the IS notification
topics - list of topics to check
Returns:
for each input topic, a boolean value: true if the registration is completed, false otherwise
Throws:
ISNotifierException - if it is impossible to perform the check for any topic


Copyright © 2012. All Rights Reserved.