Class CDIResourceEventListener<T extends ResourceEvent<?>>
- java.lang.Object
-
- org.silverpeas.core.notification.system.CDIResourceEventListener<T>
-
- All Implemented Interfaces:
ResourceEventListener<T>
- Direct Known Subclasses:
AbstractProfiledResourceSubscriptionListener
,AttachmentSharingListener
,AttachmentWebdavListener
,CalendarUserEventListener
,ChatUserEventListener
,CommentUserNotificationService
,ContributionEventProcessor
,MyLinksUserEventListener
,NodeSharingListener
,NotificationUserEventListener
,PdcGroupEventListener
,PdcNodeEventListener
,PdcUserEventListener
,PersonalizationSpaceEventListener
,PublicationSharingListener
,PublicationTemplateUserEventListener
,RegistrationUserEventListener
,RelationShipListener
,SocialNetworkUserListener
,SubscriptionGroupEventListener
,SubscriptionUserEventListener
,UserPreferenceEventListener
,UserPreferenceReminderListener
,UserReminderListener
public abstract class CDIResourceEventListener<T extends ResourceEvent<?>> extends Object implements ResourceEventListener<T>
A synchronous event listener using the notification bus of CDI. This bus is based on the Observer pattern but by using the annotations in place of code lines to setup listeners and so on.Synchronous events are carried within a specific CDI event and are collected by this abstract class. All concrete listeners have just to extend this abstract class and to implement some of the following methods to transparently receive the events on which they are interested:
org.silverpeas.core.notification.system.ResourceEventListener#onCreation(ResourceEvent
to receive events about the creation of a resource,org.silverpeas.core.notification.system.ResourceEventListener#onUpdate(ResourceEvent
to receive events about the update of a resource,org.silverpeas.core.notification.system.ResourceEventListener#onRemoving(ResourceEvent
to receive events about the removing of a resource,org.silverpeas.core.notification.system.ResourceEventListener#onDeletion(ResourceEvent
to receive events about the deletion of a resource,
- Author:
- mmoquillon
-
-
Field Summary
Fields Modifier and Type Field Description protected org.silverpeas.kernel.logging.SilverLogger
logger
-
Constructor Summary
Constructors Constructor Description CDIResourceEventListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
onEvent(T event)
Listens for events related to a resource managed in Silverpeas.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.silverpeas.core.notification.system.ResourceEventListener
dispatchEvent, isEnabled, onCreation, onDeletion, onMove, onRecovery, onRemoving, onUnlock, onUpdate
-
-
-
-
Method Detail
-
onEvent
public void onEvent(@Observes T event) throws Exception
Listens for events related to a resource managed in Silverpeas.The event is decoded from the specified message and according to the type of the event, the adequate method is then invoked.
- Parameters:
event
- an event.- Throws:
Exception
- if the processing of the event fails.- See Also:
ResourceEventListener.dispatchEvent(ResourceEvent)
-
-