org.gcube.informationsystem.notifier.impl
Class Notifier

java.lang.Object
  extended by org.gcube.informationsystem.notifier.impl.Notifier

public class Notifier
extends java.lang.Object

notifier Service Class

Author:
Lucio Lelii

Constructor Summary
Notifier()
          Default Constructor
 
Method Summary
 org.apache.axis.message.addressing.EndpointReferenceType[] getSubscribersForTopic(java.lang.String topic)
           
 IsOngoingResponse isOngoing(IsOngoingRequest request)
          controls if the register topic operation is still onGoing
 java.lang.String[] listTopicForNotifier(org.apache.axis.message.addressing.EndpointReferenceType epr)
           
 ListTopicsResponse listTopics(ListTopics topics)
          Retrieve the list of topics published in the Notifier
 void logSecurityInfo(java.lang.String methodName)
          Log the caller
 java.lang.String registerTopic(RegisterTopicMessage message)
          Allows Notifiers to register their topics to Notifier.
 RemoveNotifierResponse removeNotifier(RemoveNotifier notifiers)
          Removes the notifiers from the topics
 RemoveSubscriberResponse removeSubscriber(RemoveSubscriber subscribers)
           
 RemoveSubscriptionResponse removeSubscription(SubscribeMessage message)
          This method allows Consumer to unsubscribe from a topic.
 SubscribeToTopicResponse subscribeToTopic(SubscribeMessage message)
          Subscribes the given Consumer to the notifier(s) that expose the given topic
This methods directly subscribe the Consumer to the available notifiers and maintains
association btw subscriber and topic in order to subscribe it to if other Consumers expose
the same topic
 UnregisterTopicResponse unregisterTopic(RegisterTopicMessage message)
          Method called by a notifier that have to unregister its topics from Notifier
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Notifier

public Notifier()
         throws java.rmi.RemoteException
Default Constructor

Throws:
java.rmi.RemoteException - Exception
Method Detail

subscribeToTopic

public SubscribeToTopicResponse subscribeToTopic(SubscribeMessage message)
                                          throws GCUBEFault
Subscribes the given Consumer to the notifier(s) that expose the given topic
This methods directly subscribe the Consumer to the available notifiers and maintains
association btw subscriber and topic in order to subscribe it to if other Consumers expose
the same topic

Parameters:
message - Contains the Consumer Epr and the topic to subscribe to
Returns:
SubscribeToTopicResponse Contains an array of NotifierEPR that already espose the topic
Throws:
GCUBEFault - Exception

removeSubscription

public RemoveSubscriptionResponse removeSubscription(SubscribeMessage message)
                                              throws GCUBEFault
This method allows Consumer to unsubscribe from a topic. In order to unsubscribe
from a topic it destroys subscription Resources on the Notifiers side ( that are collected
into the stateful resource.

Parameters:
message - Contains the Consumer Epr and the topic to unsubscribe to
Returns:
RemoveSubscriptionResponse
Throws:
GCUBEFault - Exception

registerTopic

public java.lang.String registerTopic(RegisterTopicMessage message)
                               throws GCUBEFault
Allows Notifiers to register their topics to Notifier. This method controls also
wheather Subscribers exist for this topics and automatically subscribes them to the topics

Parameters:
message - Contains the EnpointReferenceType of the Notifier and the list of Topis to exposes
Returns:
RegisterTopicResponse
Throws:
GCUBEFault - Exception

unregisterTopic

public UnregisterTopicResponse unregisterTopic(RegisterTopicMessage message)
                                        throws GCUBEFault
Method called by a notifier that have to unregister its topics from Notifier

Parameters:
message - the Message definied in the Service WSDl
Returns:
UnregisterTopicResponse
Throws:
GCUBEFault - Exception

listTopics

public ListTopicsResponse listTopics(ListTopics topics)
                              throws GCUBEFault
Retrieve the list of topics published in the Notifier

Parameters:
topics - same as Void
Returns:
the list of topics
Throws:
GCUBEFault - Exception

listTopicForNotifier

public java.lang.String[] listTopicForNotifier(org.apache.axis.message.addressing.EndpointReferenceType epr)
                                        throws GCUBEFault
Parameters:
epr - the notifier epr
Returns:
a list of topics
Throws:
GCUBEFault - Exception

removeNotifier

public RemoveNotifierResponse removeNotifier(RemoveNotifier notifiers)
                                      throws GCUBEFault
Removes the notifiers from the topics

Parameters:
notifiers - array of EPR
Returns:
same as void
Throws:
GCUBEFault - Exception

removeSubscriber

public RemoveSubscriberResponse removeSubscriber(RemoveSubscriber subscribers)
                                          throws GCUBEFault
Parameters:
subscribers - same as void
Returns:
same as void
Throws:
GCUBEFault - Exception

getSubscribersForTopic

public org.apache.axis.message.addressing.EndpointReferenceType[] getSubscribersForTopic(java.lang.String topic)
                                                                                  throws GCUBEFault
Parameters:
topic - the topic
Returns:
array of EndpointRefenfence
Throws:
GCUBEFault - Exception

logSecurityInfo

public void logSecurityInfo(java.lang.String methodName)
Log the caller

Parameters:
methodName - the method name

isOngoing

public IsOngoingResponse isOngoing(IsOngoingRequest request)
                            throws java.rmi.RemoteException
controls if the register topic operation is still onGoing

Parameters:
isOngoingRequest -
Returns:
IsOngoingResponse
Throws:
java.rmi.RemoteException