public class NotificationCfg extends Object
Constructor and Description |
---|
NotificationCfg()
Default 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.
|
Modifier and Type | Method and Description |
---|---|
int |
getHealthCheckInterval()
Get configured Healtcheck interval
used by
NotificationType.NOTIF_HEALTH_CHECK
notifications. |
int |
getHeartbeatInterval()
Get configured Heartbeat interval
used by
NotificationType.NOTIF_HEARTBEAT
notifications. |
ConfValue |
getStartTime()
Get configured startTime
used by
NotificationType.NOTIF_STREAM_EVENT
notifications to define a replay start time. |
ConfValue |
getStopTime()
Get configured stopTime
used by
NotificationType.NOTIF_STREAM_EVENT
notifications to define a replay stop time. |
String |
getStreamName()
Get configured stream name
used by
NotificationType.NOTIF_STREAM_EVENT
notifications. |
int |
getUsid()
Get configured User session id
used by
NotificationType.NOTIF_STREAM_EVENT
notifications. |
Maapi.Verbosity |
getVerbosity()
Get the configured verbosity
used by
NotficationType#NOTIF_PROGRESS and
NotificationType.NOTIF_COMMIT_PROGRESS notifications. |
String |
getXPathFilter()
Get configured XPathFilter
used by
NotificationType.NOTIF_STREAM_EVENT
notifications. |
void |
setHealthCheckInterval(int healthCheckInterval)
Required if we wish to generate
NotificationType#CONFD_NOTIF_HEALTH_CHECK events. |
void |
setHeartbeatInterval(int heartbeatInterval)
Required if we wish to generate
NotificationType#CONFD_NOTIF_HEARTBEAT events. |
void |
setStartTime(ConfValue startTime)
Optional for
NotificationType#CONFD_NOTIF_STREAM_EVENT . |
void |
setStopTime(ConfValue stopTime)
Optional for
NotificationType#CONFD_NOTIF_STREAM_EVENT . |
void |
setStreamName(String streamName)
Required for
NotificationType#CONFD_NOTIF_STREAM_EVENT . |
void |
setUsid(int usid)
Optional for
NotificationType#CONFD_NOTIF_STREAM_EVENT . |
void |
setVerbosity(Maapi.Verbosity verbosity)
Optional for
NotificationType#CONFD_NOTIF_PROGRESS and
NotificationType#CONFD_NOTIF_COMMIT_PROGRESS . |
void |
setXPathFilter(String xpathFilter)
Optional for
NotificationType#CONFD_NOTIF_STREAM_EVENT . |
public NotificationCfg()
public NotificationCfg(int heartbeatInterval, int healthCheckInterval)
Notif(java.net.Socket, java.util.EnumSet, int, int)
constructorheartbeatInterval
- healthCheckInterval
- public NotificationCfg(Maapi.Verbosity verbosity)
verbosity
- default Maapi.Verbosity.NORMALpublic NotificationCfg(int heartbeatInterval, int healthCheckInterval, String streamName, ConfValue startTime, ConfValue stopTime, String xpathFilter, int usid, Maapi.Verbosity verbosity)
heartbeatInterval
- default 0healthCheckInterval
- default 0streamName
- default nullstartTime
- default ConfNoExistsstopTime
- default ConfNoExistsxpathFilter
- default nullusid
- default 0verbosity
- default Maapi.Verbosity.NORMALpublic void setHeartbeatInterval(int heartbeatInterval)
NotificationType#CONFD_NOTIF_HEARTBEAT
events.
The time is milli seconds.heartbeatInterval
- public void setHealthCheckInterval(int healthCheckInterval)
NotificationType#CONFD_NOTIF_HEALTH_CHECK
events.
The time is milli seconds.healthCheckInterval
- public void setStreamName(String streamName)
NotificationType#CONFD_NOTIF_STREAM_EVENT
.
The stream name of the Notification Stream (required).streamName
- public void setStartTime(ConfValue startTime)
NotificationType#CONFD_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.startTime
- public void setStopTime(ConfValue stopTime)
NotificationType#CONFD_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.stopTime
- public void setXPathFilter(String xpathFilter)
NotificationType#CONFD_NOTIF_STREAM_EVENT
.
XPath filter for the stream.
NULL for no filter.xpathFilter
- public void setUsid(int usid)
NotificationType#CONFD_NOTIF_STREAM_EVENT
.
User session id for AAA restriction.
Set to 0 for no AAA.usid
- public void setVerbosity(Maapi.Verbosity verbosity)
NotificationType#CONFD_NOTIF_PROGRESS
and
NotificationType#CONFD_NOTIF_COMMIT_PROGRESS
.
Sets the output verbosity.
Defaults to Maapi.Verbosity.NORMAL.verbosity
- public int getHeartbeatInterval()
NotificationType.NOTIF_HEARTBEAT
notifications.
Time is in milliseconds.public int getHealthCheckInterval()
NotificationType.NOTIF_HEALTH_CHECK
notifications.
Time is in milliseconds.public String getStreamName()
NotificationType.NOTIF_STREAM_EVENT
notifications.public ConfValue getStartTime()
NotificationType.NOTIF_STREAM_EVENT
notifications to define a replay start time.
The value is either ConfDatetime or ConfNoExists.public ConfValue getStopTime()
NotificationType.NOTIF_STREAM_EVENT
notifications to define a replay stop time.
The value is either ConfDatetime or ConfNoExists.public String getXPathFilter()
NotificationType.NOTIF_STREAM_EVENT
notifications.public int getUsid()
NotificationType.NOTIF_STREAM_EVENT
notifications.public Maapi.Verbosity getVerbosity()
NotficationType#NOTIF_PROGRESS
and
NotificationType.NOTIF_COMMIT_PROGRESS
notifications.