Package org.opennms.netmgt.model.events
Class EventBuilder
- java.lang.Object
-
- org.opennms.netmgt.model.events.EventBuilder
-
- Direct Known Subclasses:
NodeLabelChangedEventBuilder
public class EventBuilder extends java.lang.Object
EventBuilder class.
-
-
Constructor Summary
Constructors Constructor Description EventBuilder()
Constructor for EventBuilder.EventBuilder(java.lang.String uei, java.lang.String source)
Constructor for EventBuilder.EventBuilder(java.lang.String uei, java.lang.String source, java.util.Date date)
Constructor for EventBuilder.EventBuilder(Event event)
Constructor for EventBuilder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EventBuilder
addParam(java.lang.String parmName, boolean val)
addParamEventBuilder
addParam(java.lang.String parmName, char ch)
addParamEventBuilder
addParam(java.lang.String parmName, double val)
addParamEventBuilder
addParam(java.lang.String parmName, int val)
addParamEventBuilder
addParam(java.lang.String parmName, long val)
addParamEventBuilder
addParam(java.lang.String parmName, java.lang.String val)
addParamEventBuilder
addParam(java.lang.String parmName, java.lang.String val, java.lang.String type, java.lang.String encoding)
EventBuilder
addParam(java.lang.String parmName, java.util.Collection<java.lang.String> vals)
addParamEventBuilder
addParam(Parm parm)
protected void
checkForIllegalUei()
java.util.Date
currentEventTime()
Event
getEvent()
getEventLog
getLog()
protected ZonedDateTimeBuilder
getZonedDateTimeBuilder()
EventBuilder
setAlarmData(AlarmData alarmData)
setAlarmDataEventBuilder
setCommunity(java.lang.String community)
EventBuilder
setDayOfMonth(int value)
EventBuilder
setDescription(java.lang.String descr)
setDescriptionEventBuilder
setDistPoller(java.lang.String distPoller)
EventBuilder
setEnterpriseId(java.lang.String enterprise)
setEnterpriseIdvoid
setField(java.lang.String name, java.lang.String val)
setFieldEventBuilder
setGeneric(int generic)
setGenericEventBuilder
setHost(java.lang.String hostname)
setHostEventBuilder
setHourOfDay(int value)
EventBuilder
setIfIndex(int ifIndex)
setInterfaceEventBuilder
setInterface(java.net.InetAddress ipAddress)
setInterfaceEventBuilder
setIpInterface(OnmsIpInterface iface)
setIpInterfaceEventBuilder
setLogDest(java.lang.String dest)
setLogDestEventBuilder
setLogMessage(java.lang.String content)
setLogMessageEventBuilder
setMasterStation(java.lang.String masterStation)
EventBuilder
setMillisecond(int value)
EventBuilder
setMinute(int value)
EventBuilder
setMonitoredService(OnmsMonitoredService monitoredService)
setMonitoredServiceEventBuilder
setMonth(int value)
EventBuilder
setNode(OnmsNode node)
setNodeEventBuilder
setNodeid(long nodeid)
setNodeidEventBuilder
setParam(java.lang.String parmName, int val)
setParamEventBuilder
setParam(java.lang.String parmName, java.lang.String val)
setParamEventBuilder
setParms(java.util.List<Parm> parms)
setParmsEventBuilder
setSecond(int value)
EventBuilder
setService(java.lang.String serviceName)
setServiceEventBuilder
setSeverity(java.lang.String severity)
setSeverityEventBuilder
setSnmpHost(java.lang.String snmpHost)
setSnmpHostEventBuilder
setSnmpTimeStamp(long timeStamp)
EventBuilder
setSnmpVersion(java.lang.String version)
setSnmpVersionEventBuilder
setSource(java.lang.String source)
setSourceEventBuilder
setSpecific(int specific)
setSpecificEventBuilder
setTime(java.util.Date date)
setTimeEventBuilder
setTrapOID(java.lang.String trapOID)
EventBuilder
setUei(java.lang.String uei)
EventBuilder
setUuid(java.lang.String uuid)
EventBuilder
setYear(int value)
EventBuilder
setZoneId(java.time.ZoneId value)
-
-
-
Constructor Detail
-
EventBuilder
public EventBuilder()
Constructor for EventBuilder.
- Parameters:
uei
- aString
object.source
- aString
object.
-
EventBuilder
public EventBuilder(java.lang.String uei, java.lang.String source)
Constructor for EventBuilder.
- Parameters:
uei
- aString
object.source
- aString
object.
-
EventBuilder
public EventBuilder(java.lang.String uei, java.lang.String source, java.util.Date date)
Constructor for EventBuilder.
- Parameters:
uei
- aString
object.source
- aString
object.date
- aDate
object.
-
-
Method Detail
-
checkForIllegalUei
protected void checkForIllegalUei()
-
currentEventTime
public java.util.Date currentEventTime()
-
getLog
public Log getLog()
-
setUei
public EventBuilder setUei(java.lang.String uei)
-
setTime
public EventBuilder setTime(java.util.Date date)
setTime
- Parameters:
date
- aDate
object.- Returns:
- a
EventBuilder
object.
-
getZonedDateTimeBuilder
protected ZonedDateTimeBuilder getZonedDateTimeBuilder()
-
setYear
public EventBuilder setYear(int value)
-
setMonth
public EventBuilder setMonth(int value)
-
setDayOfMonth
public EventBuilder setDayOfMonth(int value)
-
setHourOfDay
public EventBuilder setHourOfDay(int value)
-
setMinute
public EventBuilder setMinute(int value)
-
setSecond
public EventBuilder setSecond(int value)
-
setMillisecond
public EventBuilder setMillisecond(int value)
-
setZoneId
public EventBuilder setZoneId(java.time.ZoneId value)
-
setSource
public EventBuilder setSource(java.lang.String source)
setSource
- Parameters:
source
- aString
object.- Returns:
- a
EventBuilder
object.
-
setSeverity
public EventBuilder setSeverity(java.lang.String severity)
setSeverity
- Parameters:
severity
- aString
object.- Returns:
- a
EventBuilder
object.
-
setNodeid
public EventBuilder setNodeid(long nodeid)
setNodeid
- Parameters:
nodeid
- a long.- Returns:
- a
EventBuilder
object.
-
setHost
public EventBuilder setHost(java.lang.String hostname)
setHost
- Parameters:
hostname
- aString
object.- Returns:
- a
EventBuilder
object.
-
setInterface
public EventBuilder setInterface(java.net.InetAddress ipAddress)
setInterface
- Parameters:
ipAddress
- aString
object.- Returns:
- a
EventBuilder
object.
-
setIfIndex
public EventBuilder setIfIndex(int ifIndex)
setInterface
- Parameters:
ipAddress
- aString
object.- Returns:
- a
EventBuilder
object.
-
setService
public EventBuilder setService(java.lang.String serviceName)
setService
- Parameters:
serviceName
- aString
object.- Returns:
- a
EventBuilder
object.
-
addParam
public EventBuilder addParam(java.lang.String parmName, java.lang.String val)
addParam
- Parameters:
parmName
- aString
object.val
- aString
object.- Returns:
- a
EventBuilder
object.
-
addParam
public EventBuilder addParam(java.lang.String parmName, java.lang.String val, java.lang.String type, java.lang.String encoding)
-
addParam
public EventBuilder addParam(Parm parm)
-
addParam
public EventBuilder addParam(java.lang.String parmName, boolean val)
addParam
- Parameters:
parmName
- aString
object.val
- aString
object.- Returns:
- a
EventBuilder
object.
-
setParam
public EventBuilder setParam(java.lang.String parmName, java.lang.String val)
setParam
- Parameters:
parmName
- aString
object.val
- aString
object.- Returns:
- a
EventBuilder
object.
-
setParam
public EventBuilder setParam(java.lang.String parmName, int val)
setParam
- Parameters:
parmName
- aString
object.val
- a int.- Returns:
- a
EventBuilder
object.
-
addParam
public EventBuilder addParam(java.lang.String parmName, double val)
addParam
- Parameters:
parmName
- aString
object.val
- a long.- Returns:
- a
EventBuilder
object.
-
addParam
public EventBuilder addParam(java.lang.String parmName, long val)
addParam
- Parameters:
parmName
- aString
object.val
- a long.- Returns:
- a
EventBuilder
object.
-
addParam
public EventBuilder addParam(java.lang.String parmName, int val)
addParam
- Parameters:
parmName
- aString
object.val
- a int.- Returns:
- a
EventBuilder
object.
-
addParam
public EventBuilder addParam(java.lang.String parmName, char ch)
addParam
- Parameters:
parmName
- aString
object.ch
- a char.- Returns:
- a
EventBuilder
object.
-
addParam
public EventBuilder addParam(java.lang.String parmName, java.util.Collection<java.lang.String> vals)
addParam
- Parameters:
parmName
- aString
object.vals
- aCollection
object.- Returns:
- a
EventBuilder
object.
-
setAlarmData
public EventBuilder setAlarmData(AlarmData alarmData)
setAlarmData
- Parameters:
alarmData
- aAlarmData
object.- Returns:
- a
EventBuilder
object.
-
setNode
public EventBuilder setNode(OnmsNode node)
setNode
- Parameters:
node
- aOnmsNode
object.- Returns:
- a
EventBuilder
object.
-
setIpInterface
public EventBuilder setIpInterface(OnmsIpInterface iface)
setIpInterface
- Parameters:
iface
- aOnmsIpInterface
object.- Returns:
- a
EventBuilder
object.
-
setMonitoredService
public EventBuilder setMonitoredService(OnmsMonitoredService monitoredService)
setMonitoredService
- Parameters:
monitoredService
- aOnmsMonitoredService
object.- Returns:
- a
EventBuilder
object.
-
setSnmpVersion
public EventBuilder setSnmpVersion(java.lang.String version)
setSnmpVersion
- Parameters:
version
- aString
object.- Returns:
- a
EventBuilder
object.
-
setCommunity
public EventBuilder setCommunity(java.lang.String community)
-
setEnterpriseId
public EventBuilder setEnterpriseId(java.lang.String enterprise)
setEnterpriseId
- Parameters:
enterprise
- aString
object.- Returns:
- a
EventBuilder
object.
-
setTrapOID
public EventBuilder setTrapOID(java.lang.String trapOID)
-
setGeneric
public EventBuilder setGeneric(int generic)
setGeneric
- Parameters:
generic
- a int.- Returns:
- a
EventBuilder
object.
-
setSpecific
public EventBuilder setSpecific(int specific)
setSpecific
- Parameters:
specific
- a int.- Returns:
- a
EventBuilder
object.
-
setSnmpHost
public EventBuilder setSnmpHost(java.lang.String snmpHost)
setSnmpHost
- Parameters:
snmpHost
- aString
object.- Returns:
- a
EventBuilder
object.
-
setSnmpTimeStamp
public EventBuilder setSnmpTimeStamp(long timeStamp)
-
setField
public void setField(java.lang.String name, java.lang.String val)
setField
- Parameters:
name
- aString
object.val
- aString
object.
-
setLogDest
public EventBuilder setLogDest(java.lang.String dest)
setLogDest
- Parameters:
dest
- aString
object.- Returns:
- a
EventBuilder
object.
-
setLogMessage
public EventBuilder setLogMessage(java.lang.String content)
setLogMessage
- Parameters:
content
- aString
object.- Returns:
- a
EventBuilder
object.
-
setDescription
public EventBuilder setDescription(java.lang.String descr)
setDescription
- Parameters:
descr
- aString
object.- Returns:
- a
EventBuilder
object.
-
setParms
public EventBuilder setParms(java.util.List<Parm> parms)
setParms
- Parameters:
parms
- a list of parameters.- Returns:
- the event builder
-
setUuid
public EventBuilder setUuid(java.lang.String uuid)
-
setDistPoller
public EventBuilder setDistPoller(java.lang.String distPoller)
-
setMasterStation
public EventBuilder setMasterStation(java.lang.String masterStation)
-
-