@Service public class NotificationController extends AbstractEventController
NotificationController
handles the processing and routing of notifications.Modifier and Type | Field and Description |
---|---|
protected static String |
NOTIFICATION_TOPIC_DOWNLOADS_COMETD |
EVENT_TOPIC_CANCEL
Constructor and Description |
---|
NotificationController(PersistentStore persistentStore,
org.osgi.framework.BundleContext bundleContext,
org.osgi.service.event.EventAdmin eventAdmin) |
Modifier and Type | Method and Description |
---|---|
void |
deletePersistentNotification(org.cometd.bayeux.server.ServerSession serverSession,
org.cometd.bayeux.server.ServerMessage serverMessage) |
String |
getControllerRootTopic()
Obtains the root topic of the controller that should be used when registering the eventhandler.
|
List<Map<String,Object>> |
getNotificationsForUser(String userId) |
void |
getPersistedNotifications(org.cometd.bayeux.server.ServerSession remote,
org.cometd.bayeux.Message message) |
void |
handleEvent(org.osgi.service.event.Event event)
Implementation of
EventHandler.handleEvent(Event) that receives
notifications published on the Notification.NOTIFICATION_TOPIC_ROOT topic from the OSGi
eventing framework and forwards them to their intended recipients. |
adminCancelDownload, deregisterUserSession, getSessionById, getSessionBySessionId, getSessionByUserId, getUserId, queuePersistedMessages, registerUserSession
protected static final String NOTIFICATION_TOPIC_DOWNLOADS_COMETD
public NotificationController(PersistentStore persistentStore, org.osgi.framework.BundleContext bundleContext, org.osgi.service.event.EventAdmin eventAdmin)
public void handleEvent(org.osgi.service.event.Event event) throws IllegalArgumentException
EventHandler.handleEvent(Event)
that receives
notifications published on the Notification.NOTIFICATION_TOPIC_ROOT
topic from the OSGi
eventing framework and forwards them to their intended recipients.IllegalArgumentException
- when any of the following required properties are either
missing from the Event or contain empty values:
public String getControllerRootTopic()
AbstractEventController
getControllerRootTopic
in class AbstractEventController
@Listener(value="/ddf/notifications") public void getPersistedNotifications(org.cometd.bayeux.server.ServerSession remote, org.cometd.bayeux.Message message)
@Listener(value="/notification/action") public void deletePersistentNotification(org.cometd.bayeux.server.ServerSession serverSession, org.cometd.bayeux.server.ServerMessage serverMessage)
This work is licensed under a Creative Commons Attribution 4.0 International License.