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 Object
EventBuilder class.
-
-
Constructor Summary
Constructors Constructor Description EventBuilder()
Constructor for EventBuilder.EventBuilder(String uei, String source)
Constructor for EventBuilder.EventBuilder(String uei, String source, Date date)
Constructor for EventBuilder.EventBuilder(Event event)
Constructor for EventBuilder.
-
Method Summary
-
-
-
Method Detail
-
checkForIllegalUei
protected void checkForIllegalUei()
-
currentEventTime
public Date currentEventTime()
-
getLog
public Log getLog()
-
setUei
public EventBuilder setUei(String uei)
-
setTime
public EventBuilder setTime(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(String source)
setSource
- Parameters:
source
- aString
object.- Returns:
- a
EventBuilder
object.
-
setSeverity
public EventBuilder setSeverity(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(String hostname)
setHost
- Parameters:
hostname
- aString
object.- Returns:
- a
EventBuilder
object.
-
setInterface
public EventBuilder setInterface(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(String serviceName)
setService
- Parameters:
serviceName
- aString
object.- Returns:
- a
EventBuilder
object.
-
addParam
public EventBuilder addParam(String parmName, String val)
addParam
- Parameters:
parmName
- aString
object.val
- aString
object.- Returns:
- a
EventBuilder
object.
-
addParam
public EventBuilder addParam(String parmName, String val, String type, String encoding)
-
addParam
public EventBuilder addParam(Parm parm)
-
addParam
public EventBuilder addParam(String parmName, boolean val)
addParam
- Parameters:
parmName
- aString
object.val
- aString
object.- Returns:
- a
EventBuilder
object.
-
setParam
public EventBuilder setParam(String parmName, String val)
setParam
- Parameters:
parmName
- aString
object.val
- aString
object.- Returns:
- a
EventBuilder
object.
-
setParam
public EventBuilder setParam(String parmName, int val)
setParam
- Parameters:
parmName
- aString
object.val
- a int.- Returns:
- a
EventBuilder
object.
-
addParam
public EventBuilder addParam(String parmName, double val)
addParam
- Parameters:
parmName
- aString
object.val
- a long.- Returns:
- a
EventBuilder
object.
-
addParam
public EventBuilder addParam(String parmName, long val)
addParam
- Parameters:
parmName
- aString
object.val
- a long.- Returns:
- a
EventBuilder
object.
-
addParam
public EventBuilder addParam(String parmName, int val)
addParam
- Parameters:
parmName
- aString
object.val
- a int.- Returns:
- a
EventBuilder
object.
-
addParam
public EventBuilder addParam(String parmName, char ch)
addParam
- Parameters:
parmName
- aString
object.ch
- a char.- Returns:
- a
EventBuilder
object.
-
addParam
public EventBuilder addParam(String parmName, Collection<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(String version)
setSnmpVersion
- Parameters:
version
- aString
object.- Returns:
- a
EventBuilder
object.
-
setCommunity
public EventBuilder setCommunity(String community)
-
setEnterpriseId
public EventBuilder setEnterpriseId(String enterprise)
setEnterpriseId
- Parameters:
enterprise
- aString
object.- Returns:
- a
EventBuilder
object.
-
setTrapOID
public EventBuilder setTrapOID(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(String snmpHost)
setSnmpHost
- Parameters:
snmpHost
- aString
object.- Returns:
- a
EventBuilder
object.
-
setSnmpTimeStamp
public EventBuilder setSnmpTimeStamp(long timeStamp)
-
setLogDest
public EventBuilder setLogDest(String dest)
setLogDest
- Parameters:
dest
- aString
object.- Returns:
- a
EventBuilder
object.
-
setLogMessage
public EventBuilder setLogMessage(String content)
setLogMessage
- Parameters:
content
- aString
object.- Returns:
- a
EventBuilder
object.
-
setDescription
public EventBuilder setDescription(String descr)
setDescription
- Parameters:
descr
- aString
object.- Returns:
- a
EventBuilder
object.
-
setParms
public EventBuilder setParms(List<Parm> parms)
setParms
- Parameters:
parms
- a list of parameters.- Returns:
- the event builder
-
setUuid
public EventBuilder setUuid(String uuid)
-
setDistPoller
public EventBuilder setDistPoller(String distPoller)
-
setMasterStation
public EventBuilder setMasterStation(String masterStation)
-
-