@Contract public abstract class NotificationEventFactory<E extends NotificationEvent> extends Object
NotificationEvent| Constructor and Description |
|---|
NotificationEventFactory() |
| Modifier and Type | Method and Description |
|---|---|
E |
buildNotificationEvent(Level level,
String subject,
String message,
Object[] parameters)
Creates a
NotificationEvent |
E |
buildNotificationEvent(String name,
List<HealthCheckResultEntry> entries,
Level level) |
E |
buildNotificationEvent(String subject,
RequestTrace requestTrace) |
E |
buildNotificationEvent(String subject,
String message)
Creates a
NotificationEvent |
protected abstract E |
createEventInstance() |
protected String |
getCumulativeMessages(List<HealthCheckResultEntry> entries) |
protected String |
getMessageFormatted(Object[] parameters) |
NotificationEventFactoryStore |
getStore() |
protected String |
getSubject(Level level) |
protected E |
initializeEvent(E e) |
protected void |
registerEventFactory(NotifierType type,
NotificationEventFactory notificationEventFactory) |
protected void registerEventFactory(NotifierType type, NotificationEventFactory notificationEventFactory)
protected abstract E createEventInstance()
public E buildNotificationEvent(String subject, String message)
NotificationEventsubject - Subject of the message
i.e. what the subject line is if the event is sent to the Javamail notifiermessage - The message text of the eventNotificationEventpublic E buildNotificationEvent(String subject, RequestTrace requestTrace)
public E buildNotificationEvent(String name, List<HealthCheckResultEntry> entries, Level level)
public E buildNotificationEvent(Level level, String subject, String message, Object[] parameters)
NotificationEventlevel - Severity level of notification. This is unused in the base factorysubject - Subject of the message
i.e. what the subject line is if the event is sent to the Javamail notifiermessage - The message text of the eventparameters - An additional parameters to be formatted as part of the messageNotificationEventpublic NotificationEventFactoryStore getStore()
protected String getCumulativeMessages(List<HealthCheckResultEntry> entries)
Copyright © 2019. All rights reserved.