com.silverpeas.notification
Interface MessageSubscribingService

All Known Implementing Classes:
JMSSubscribingService

public interface MessageSubscribingService

Front end of the subscribing service in a specific messaging system. It wraps the actual underlying MOM system used for the subsccription without having a strong dependency on it (JMS, AMQP, ...). The concrete MOM system implementing this interface is managed by the IoC container under the name 'messageSubscribingService'.


Method Summary
 void subscribe(NotificationSubscriber listener, NotificationTopic onTopic)
          Subscribes the specified notification listener on the specified topic.
 void unsubscribe(NotificationSubscriber listener, NotificationTopic fromTopic)
          Unsubscribes the specified notification listener from the specified topic.
 

Method Detail

subscribe

void subscribe(NotificationSubscriber listener,
               NotificationTopic onTopic)
Subscribes the specified notification listener on the specified topic. The topic should exists, otherwise a SubscribingException is thrown. If the subscriber is already subscribed to the topic, then nothing is done.

Parameters:
listener - the listener to subscribe.
onTopic - the event topic to subscribe.

unsubscribe

void unsubscribe(NotificationSubscriber listener,
                 NotificationTopic fromTopic)
Unsubscribes the specified notification listener from the specified topic. If the subscriber isn't subscribed to the specified topic, nothing is done. The topic should exists, otherwise a SubscribingException is thrown.

Parameters:
listener - the listener to unsubscribe.
fromTopic - the event topîc to unsubscribe.


Copyright © 2016 Silverpeas. All Rights Reserved.