|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.silverpeas.notification.DefaultNotificationSubscriber
public abstract class DefaultNotificationSubscriber
It is the default implementation of the NotificationSubscriber interface. It is dedicated to be extended by more business specific notification listener. It encapsulates the access to the underlying messaging broker for performing the actual notification subscriptions. The business specific notification subscriber extending this class must be registered within an IoC container so that it will be automatically instanciated and the subscription will be then automatically performed by the IoC container. The IoC container will inject the implementation of the messaging system used to accomplish the notification mechanism in Silverpeas.
Constructor Summary | |
---|---|
DefaultNotificationSubscriber()
|
Method Summary | |
---|---|
String |
getId()
Gets the unique identifier of this subscriber in the MOM system. |
void |
setId(String id)
Sets the unique identifier for this subscriber in the underlying MOM system. |
void |
subscribeForNotifications(NotificationTopic onTopic)
Subscribes to notifications received on the specified topic. |
abstract void |
subscribeOnTopics()
Subscribes the topics this subscriber is interested on. |
void |
unsubscribeForNotifications(NotificationTopic onTopic)
Unsubscribes from the notifications sent on the specified topic. |
abstract void |
unsubscribeOnTopics()
Unsubscribes from the topics this subscriber is subscribed on. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.silverpeas.notification.NotificationSubscriber |
---|
onNotification |
Constructor Detail |
---|
public DefaultNotificationSubscriber()
Method Detail |
---|
@PostConstruct public abstract void subscribeOnTopics()
@PreDestroy public abstract void unsubscribeOnTopics()
public String getId()
NotificationSubscriber
getId
in interface NotificationSubscriber
public void setId(String id)
setId
in interface NotificationSubscriber
id
- the unique identifier to set.public final void subscribeForNotifications(NotificationTopic onTopic)
NotificationSubscriber
subscribeForNotifications
in interface NotificationSubscriber
onTopic
- the topic on which this listener listens.public final void unsubscribeForNotifications(NotificationTopic onTopic)
NotificationSubscriber
unsubscribeForNotifications
in interface NotificationSubscriber
onTopic
- the topic to unsubscribe.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |