Package com.tailf.notif
Class NotificationCfg
Object
com.tailf.notif.NotificationCfg
-
Constructor Summary
ConstructorDescriptionDefault constructor, all values has to be set using the setter methods.NotificationCfg
(int heartbeatInterval, int healthCheckInterval) Creates a NotificationCfg instance with only the heartbeatInterval and healthCheckInterval.NotificationCfg
(int heartbeatInterval, int healthCheckInterval, String streamName, ConfValue startTime, ConfValue stopTime, String xpathFilter, int usid, Maapi.Verbosity verbosity) Convenience constructor setting all values.NotificationCfg
(Maapi.Verbosity verbosity) Creates a NotificationCfg instance with only the verbosity. -
Method Summary
Modifier and TypeMethodDescriptionint
Get configured Healtcheck interval used byNotificationType.NOTIF_HEALTH_CHECK
notifications.int
Get configured Heartbeat interval used byNotificationType.NOTIF_HEARTBEAT
notifications.Get configured startTime used byNotificationType.NOTIF_STREAM_EVENT
notifications to define a replay start time.Get configured stopTime used byNotificationType.NOTIF_STREAM_EVENT
notifications to define a replay stop time.Get configured stream name used byNotificationType.NOTIF_STREAM_EVENT
notifications.int
getUsid()
Get configured User session id used byNotificationType.NOTIF_STREAM_EVENT
notifications.Get the configured verbosity used byNotificationType.NOTIF_PROGRESS
andNotificationType.NOTIF_COMMIT_PROGRESS
notifications.Get configured XPathFilter used byNotificationType.NOTIF_STREAM_EVENT
notifications.void
setHealthCheckInterval
(int healthCheckInterval) Required if we wish to generateNotificationType.NOTIF_HEALTH_CHECK
events.void
setHeartbeatInterval
(int heartbeatInterval) Required if we wish to generateNotificationType.NOTIF_HEARTBEAT
events.void
setStartTime
(ConfValue startTime) Optional forNotificationType.NOTIF_STREAM_EVENT
.void
setStopTime
(ConfValue stopTime) Optional forNotificationType.NOTIF_STREAM_EVENT
.void
setStreamName
(String streamName) Required forNotificationType.NOTIF_STREAM_EVENT
.void
setUsid
(int usid) Optional forNotificationType.NOTIF_STREAM_EVENT
.void
setVerbosity
(Maapi.Verbosity verbosity) Optional forNotificationType.NOTIF_PROGRESS
andNotificationType.NOTIF_COMMIT_PROGRESS
.void
setXPathFilter
(String xpathFilter) Optional forNotificationType.NOTIF_STREAM_EVENT
.
-
Constructor Details
-
NotificationCfg
public NotificationCfg()Default constructor, all values has to be set using the setter methods. -
NotificationCfg
public NotificationCfg(int heartbeatInterval, int healthCheckInterval) Creates a NotificationCfg instance with only the heartbeatInterval and healthCheckInterval. This constructor exist for the internal use of theNotif(java.net.Socket, java.util.EnumSet, int, int)
constructor- Parameters:
heartbeatInterval
-healthCheckInterval
-
-
NotificationCfg
Creates a NotificationCfg instance with only the verbosity.- Parameters:
verbosity
- default Maapi.Verbosity.NORMAL
-
NotificationCfg
public NotificationCfg(int heartbeatInterval, int healthCheckInterval, String streamName, ConfValue startTime, ConfValue stopTime, String xpathFilter, int usid, Maapi.Verbosity verbosity) Convenience constructor setting all values. Unused values should be set to their defaults.- Parameters:
heartbeatInterval
- default 0healthCheckInterval
- default 0streamName
- default nullstartTime
- default ConfNoExistsstopTime
- default ConfNoExistsxpathFilter
- default nullusid
- default 0verbosity
- default Maapi.Verbosity.NORMAL
-
-
Method Details
-
setHeartbeatInterval
public void setHeartbeatInterval(int heartbeatInterval) Required if we wish to generateNotificationType.NOTIF_HEARTBEAT
events. The time is milli seconds.- Parameters:
heartbeatInterval
-
-
setHealthCheckInterval
public void setHealthCheckInterval(int healthCheckInterval) Required if we wish to generateNotificationType.NOTIF_HEALTH_CHECK
events. The time is milli seconds.- Parameters:
healthCheckInterval
-
-
setStreamName
Required forNotificationType.NOTIF_STREAM_EVENT
. The stream name of the Notification Stream (required).- Parameters:
streamName
-
-
setStartTime
Optional forNotificationType.NOTIF_STREAM_EVENT
. Set to request a replay. If no value is indicated by ConfNoExists which is the default. Allowed values are of type ConfNoExists or ConfDatetime.- Parameters:
startTime
-
-
setStopTime
Optional forNotificationType.NOTIF_STREAM_EVENT
. If startTime is set stopTime can also be set to indicated the end of a replay. If no value is indicated by ConfNoExists which is the default. Allowed values are of type ConfNoExists or ConfDatetime.- Parameters:
stopTime
-
-
setXPathFilter
Optional forNotificationType.NOTIF_STREAM_EVENT
. XPath filter for the stream. NULL for no filter.- Parameters:
xpathFilter
-
-
setUsid
public void setUsid(int usid) Optional forNotificationType.NOTIF_STREAM_EVENT
. User session id for AAA restriction. Set to 0 for no AAA.- Parameters:
usid
-
-
setVerbosity
Optional forNotificationType.NOTIF_PROGRESS
andNotificationType.NOTIF_COMMIT_PROGRESS
. Sets the output verbosity. Defaults to Maapi.Verbosity.NORMAL.- Parameters:
verbosity
-
-
getHeartbeatInterval
public int getHeartbeatInterval()Get configured Heartbeat interval used byNotificationType.NOTIF_HEARTBEAT
notifications. Time is in milliseconds.- Returns:
- heartbeatInterval
-
getHealthCheckInterval
public int getHealthCheckInterval()Get configured Healtcheck interval used byNotificationType.NOTIF_HEALTH_CHECK
notifications. Time is in milliseconds.- Returns:
- healthCheckInterval
-
getStreamName
Get configured stream name used byNotificationType.NOTIF_STREAM_EVENT
notifications.- Returns:
- streamName
-
getStartTime
Get configured startTime used byNotificationType.NOTIF_STREAM_EVENT
notifications to define a replay start time. The value is either ConfDatetime or ConfNoExists.- Returns:
- startTime
-
getStopTime
Get configured stopTime used byNotificationType.NOTIF_STREAM_EVENT
notifications to define a replay stop time. The value is either ConfDatetime or ConfNoExists.- Returns:
- stopTime
-
getXPathFilter
Get configured XPathFilter used byNotificationType.NOTIF_STREAM_EVENT
notifications.- Returns:
- XPathFilter
-
getUsid
public int getUsid()Get configured User session id used byNotificationType.NOTIF_STREAM_EVENT
notifications.- Returns:
- usid
-
getVerbosity
Get the configured verbosity used byNotificationType.NOTIF_PROGRESS
andNotificationType.NOTIF_COMMIT_PROGRESS
notifications.- Returns:
- verbosity
-