com.silverpeas.notification.jms
Class JMSSubscribingService

java.lang.Object
  extended by com.silverpeas.notification.jms.JMSSubscribingService
All Implemented Interfaces:
ConnectionFailureListener, MessageSubscribingService

@Named(value="messageSubscribingService")
public class JMSSubscribingService
extends Object
implements MessageSubscribingService, ConnectionFailureListener

Implementation of the subscribing service using the JMS API. This service is managed by the IoC container under the name 'messageSubscribingService' as required by the Notification API. The JMS system is injected as a dependency by the IoC container.


Constructor Summary
JMSSubscribingService()
           
 
Method Summary
 void initialize()
           
 void onConnectionFailure()
           
 void subscribe(NotificationSubscriber subscriber, NotificationTopic onTopic)
          Subscribes the specified notification listener on the specified topic.
 void unsubscribe(NotificationSubscriber subscriber, NotificationTopic fromTopic)
          Unsubscribes the specified notification listener from the specified topic.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JMSSubscribingService

public JMSSubscribingService()
Method Detail

initialize

@PostConstruct
public void initialize()

subscribe

public void subscribe(NotificationSubscriber subscriber,
                      NotificationTopic onTopic)
Description copied from interface: MessageSubscribingService
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.

Specified by:
subscribe in interface MessageSubscribingService
Parameters:
subscriber - the listener to subscribe.
onTopic - the event topic to subscribe.

unsubscribe

public void unsubscribe(NotificationSubscriber subscriber,
                        NotificationTopic fromTopic)
Description copied from interface: MessageSubscribingService
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.

Specified by:
unsubscribe in interface MessageSubscribingService
Parameters:
subscriber - the listener to unsubscribe.
fromTopic - the event topîc to unsubscribe.

onConnectionFailure

public void onConnectionFailure()
Specified by:
onConnectionFailure in interface ConnectionFailureListener


Copyright © 2016 Silverpeas. All Rights Reserved.