本文整理了Java中org.opennms.netmgt.xml.event.Event.getCreationTime()
方法的一些代码示例,展示了Event.getCreationTime()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Event.getCreationTime()
方法的具体详情如下:
包路径:org.opennms.netmgt.xml.event.Event
类名称:Event
方法名:getCreationTime
[英]Returns the value of field 'creationTime'. The field 'creationTime' has the following description: from header
[中]返回字段“creationTime”的值。“creationTime”字段具有以下描述:从标题
代码示例来源:origin: OpenNMS/opennms
/**
* <p>getEvent</p>
*
* @return a {@link org.opennms.netmgt.xml.event.Event} object.
*/
public Event getEvent() {
if (m_event.getTime() == null && zonedDateTimeBuilder != null) {
ZonedDateTime time = zonedDateTimeBuilder.build();
m_event.setTime(Date.from(time.toInstant()));
}
if (m_event.getCreationTime() == null) {
// The creation time has been used as the time when the event
// is stored in the database so update it right before we return
// the event object.
m_event.setCreationTime(new Date());
}
return m_event;
}
代码示例来源:origin: OpenNMS/opennms
if (event.getCreationTime() != null) {
b.append(" CreationTime: " + event.getCreationTime() + "\n");
代码示例来源:origin: OpenNMS/opennms
public Log getLog() {
Event event = getEvent();
Events events = new Events();
events.setEvent(new Event[]{event});
Header header = new Header();
header.setCreated(StringUtils.toStringEfficiently(event.getCreationTime()));
Log log = new Log();
log.setHeader(header);
log.setEvents(events);
return log;
}
代码示例来源:origin: OpenNMS/opennms
Integer eventId = getNextEventId();
if (e.getCreationTime() == null) {
e.setCreationTime(new Date());
e.getSource(),
e.getUei(),
new Timestamp(e.getCreationTime().getTime()),
new Timestamp(e.getTime().getTime()),
Integer.valueOf(OnmsSeverity.get(e.getSeverity()).getId()),
代码示例来源:origin: org.opennms.core.test-api/org.opennms.core.test-api.db
Integer eventId = getNextEventId();
if (e.getCreationTime() == null) {
e.setCreationTime(new Date());
e.getSource(),
e.getUei(),
new Timestamp(e.getCreationTime().getTime()),
new Timestamp(e.getTime().getTime()),
Integer.valueOf(OnmsSeverity.get(e.getSeverity()).getId()),
代码示例来源:origin: OpenNMS/opennms
else
snmpTrapHelper.addVarBinding(trap, ".1.3.6.1.4.1.5813.20.1.2.0", "OctetString", "text", "null");
if (event.getCreationTime() != null)
snmpTrapHelper.addVarBinding(trap, ".1.3.6.1.4.1.5813.20.1.3.0", "OctetString", "text", EventConstants.formatToString(event.getCreationTime()));
else
snmpTrapHelper.addVarBinding(trap, ".1.3.6.1.4.1.5813.20.1.3.0", "OctetString", "text", "null");
代码示例来源:origin: OpenNMS/opennms
oe.setEventAutoAction((event.getAutoactionCount() > 0) ? AutoAction.format(event.getAutoaction(), EVENT_AUTOACTION_FIELD_SIZE) : null);
oe.setEventCorrelation((event.getCorrelation() != null) ? org.opennms.netmgt.dao.util.Correlation.format(event.getCorrelation(), EVENT_CORRELATION_FIELD_SIZE) : null);
oe.setEventCreateTime(event.getCreationTime());
oe.setId(event.getDbid());
oe.setEventDescr(event.getDescr());
代码示例来源:origin: org.opennms/opennms-dao-mock
oe.setEventAutoAction((event.getAutoactionCount() > 0) ? AutoAction.format(event.getAutoaction(), EVENT_AUTOACTION_FIELD_SIZE) : null);
oe.setEventCorrelation((event.getCorrelation() != null) ? org.opennms.netmgt.dao.util.Correlation.format(event.getCorrelation(), EVENT_CORRELATION_FIELD_SIZE) : null);
oe.setEventCreateTime(event.getCreationTime());
oe.setId(event.getDbid());
oe.setEventDescr(event.getDescr());
内容来源于网络,如有侵权,请联系作者删除!