public class AlarmChangeNotificationClient extends Object implements NotificationClient
Modifier and Type | Field and Description |
---|---|
static String |
ALARM_ACKNOWLEDGED_EVENT |
static String |
ALARM_CHANGED_EVENT |
static String |
ALARM_CLEARED_EVENT |
static String |
ALARM_CREATED_EVENT |
static String |
ALARM_DELETED_EVENT |
static String |
ALARM_SEVERITY_CHANGED_EVENT |
static String |
ALARM_STICKYMEMO_ADD_EVENT |
static String |
ALARM_SUPPRESSED_EVENT |
static String |
ALARM_TROUBLETICKET_STATE_CHANGE_EVENT |
static String |
ALARM_UNACKNOWLEDGED_EVENT |
static String |
ALARM_UNSUPPRESSED_EVENT |
static String |
EVENT_SOURCE_NAME |
static String |
INITIAL_SEVERITY |
static String |
NEW_ALARM_VALUES |
static String |
OLD_ALARM_VALUES |
Constructor and Description |
---|
AlarmChangeNotificationClient() |
Modifier and Type | Method and Description |
---|---|
void |
destroy() |
EventProxy |
getEventProxy() |
void |
init() |
org.json.simple.JSONObject |
jsonAlarmTimeNormaliser(org.json.simple.JSONObject jsonObject)
concerts all time values into a normalised time in alarm json object from database
example timestamps to translate
{
"suppressedtime":"2016-08-04 16:11:16.01+01",
"suppresseduntil":"2016-08-04 16:11:16.01+01",
"lasteventtime":"2016-08-04 16:11:16.01+01",
"alarmacktime":"2016-08-04 07:34:04.617+01",
"firsteventtime":"2016-08-04 16:11:16.01+01",
"firstautomationtime":"2016-08-04 16:12:03.272205+01",
"lastautomationtime":"2016-08-04 16:12:03.272205+01"
}
|
void |
sendDbNotification(DbNotification dbNotification) |
void |
setEventProxy(EventProxy eventProxy) |
String |
timeNormaliser(String dbTimeStr)
converts postgres json time format to normalised time format for matching to Elastic Search
date_optional_time or strict_date_optional_time
(A generic ISO datetime parser where the date is mandatory and the time is optional
see https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-date-format.html#strict-date-time)
|
public static final String EVENT_SOURCE_NAME
public static final String ALARM_DELETED_EVENT
public static final String ALARM_CREATED_EVENT
public static final String ALARM_SEVERITY_CHANGED_EVENT
public static final String ALARM_CLEARED_EVENT
public static final String ALARM_ACKNOWLEDGED_EVENT
public static final String ALARM_UNACKNOWLEDGED_EVENT
public static final String ALARM_SUPPRESSED_EVENT
public static final String ALARM_UNSUPPRESSED_EVENT
public static final String ALARM_TROUBLETICKET_STATE_CHANGE_EVENT
public static final String ALARM_CHANGED_EVENT
public static final String ALARM_STICKYMEMO_ADD_EVENT
public static final String OLD_ALARM_VALUES
public static final String NEW_ALARM_VALUES
public static final String INITIAL_SEVERITY
public EventProxy getEventProxy()
public void setEventProxy(EventProxy eventProxy)
public void sendDbNotification(DbNotification dbNotification)
sendDbNotification
in interface NotificationClient
public org.json.simple.JSONObject jsonAlarmTimeNormaliser(org.json.simple.JSONObject jsonObject)
jsonObject
- public String timeNormaliser(String dbTimeStr)
dbTimeStr
- public void init()
init
in interface NotificationClient
public void destroy()
destroy
in interface NotificationClient
Copyright © 2017. All rights reserved.