Package fish.payara.nucleus.notification
Class NotificationService
- java.lang.Object
-
- fish.payara.nucleus.notification.NotificationService
-
- All Implemented Interfaces:
NotifierManager
,EventListener
,ConfigListener
@Service(name="notification-service") @RunLevel(10) @MessageReceiver public class NotificationService extends Object implements NotifierManager, EventListener, ConfigListener
Main service class that receivednotify(PayaraNotification)
HK2 events, and distributes them to notifiers discovered by the service.- Author:
- mertcaliskan, Matthew Gill
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.glassfish.api.event.EventListener
EventListener.Event<T>
-
-
Constructor Summary
Constructors Constructor Description NotificationService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
bootstrapNotificationService()
UnprocessedChangeEvents
changed(PropertyChangeEvent[] events)
Notification that @Configured objects that were injected have changedvoid
event(EventListener.Event<?> event)
Process a Glassfish/Payara eventvoid
notify(PayaraNotification event)
void
reconfigureNotifier(PayaraNotifierConfiguration configuration)
Alert the notification service that a notifier configuration has been updated with the --dynamic flag, so the notifier needs updating dynamically.void
shutdownNotificationService()
-
-
-
Method Detail
-
event
public void event(EventListener.Event<?> event)
Description copied from interface:EventListener
Process a Glassfish/Payara event- Specified by:
event
in interfaceEventListener
-
shutdownNotificationService
public void shutdownNotificationService()
-
bootstrapNotificationService
public void bootstrapNotificationService()
-
notify
public void notify(@SubscribeTo PayaraNotification event)
-
reconfigureNotifier
public void reconfigureNotifier(PayaraNotifierConfiguration configuration)
Description copied from interface:NotifierManager
Alert the notification service that a notifier configuration has been updated with the --dynamic flag, so the notifier needs updating dynamically.- Specified by:
reconfigureNotifier
in interfaceNotifierManager
- Parameters:
configuration
- the configuration that was updated
-
changed
public UnprocessedChangeEvents changed(PropertyChangeEvent[] events)
Description copied from interface:ConfigListener
Notification that @Configured objects that were injected have changed- Specified by:
changed
in interfaceConfigListener
- Parameters:
events
- list of changes- Returns:
- the list of unprocessed events (requiring a restart) or null if all reconfiguration was processed successfully
-
-