本文整理了Java中org.opennms.netmgt.xml.event.Event.getSnmp()
方法的一些代码示例,展示了Event.getSnmp()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Event.getSnmp()
方法的具体详情如下:
包路径:org.opennms.netmgt.xml.event.Event
类名称:Event
方法名:getSnmp
[英]Returns the value of field 'snmp'. The field 'snmp' has the following description: The snmp information from the trap
[中]返回字段“snmp”的值。字段“snmp”具有以下描述:陷阱中的snmp信息
代码示例来源:origin: OpenNMS/opennms
public String get(Event event) {
return event.getSnmp() == null || !event.getSnmp().hasGeneric()
? null
: Integer.toString(event.getSnmp().getGeneric());
}
};
代码示例来源:origin: OpenNMS/opennms
public String get(Event event) {
return event.getSnmp() == null || !event.getSnmp().hasSpecific()
? null
: Integer.toString(event.getSnmp().getSpecific());
}
};
代码示例来源:origin: OpenNMS/opennms
@Override
public String getValue(String parm, String parsedParm, Event event, EventUtil eventUtil) {
Snmp info = event.getSnmp();
if (info != null) {
return info.getId();
}
return null;
}
},
代码示例来源:origin: OpenNMS/opennms
@Override
public String getValue(String parm, String parsedParm, Event event, EventUtil eventUtil) {
Snmp info = event.getSnmp();
if (info != null) {
return info.getVersion();
}
return null;
}
},
代码示例来源:origin: org.opennms.features.events/org.opennms.features.events.daemon
@Override
public String getValue(String parm, String parsedParm, Event event, EventUtil eventUtil) {
Snmp info = event.getSnmp();
if (info != null) {
return info.getId();
}
return null;
}
},
代码示例来源:origin: OpenNMS/opennms
@Override
public String getValue(String parm, String parsedParm, Event event, EventUtil eventUtil) {
Snmp info = event.getSnmp();
if (info != null && info.hasGeneric()) {
return Integer.toString(info.getGeneric());
}
return null;
}
},
代码示例来源:origin: OpenNMS/opennms
@Override
public String getValue(String parm, String parsedParm, Event event, EventUtil eventUtil) {
Snmp info = event.getSnmp();
if (info != null && info.hasSpecific()) {
return Integer.toString(info.getSpecific());
}
return null;
}
},
代码示例来源:origin: org.opennms.features.events/org.opennms.features.events.daemon
@Override
public String getValue(String parm, String parsedParm, Event event, EventUtil eventUtil) {
Snmp info = event.getSnmp();
if (info != null && info.hasSpecific()) {
return Integer.toString(info.getSpecific());
}
return null;
}
},
代码示例来源:origin: org.opennms.features.events/org.opennms.features.events.daemon
@Override
public String getValue(String parm, String parsedParm, Event event, EventUtil eventUtil) {
Snmp info = event.getSnmp();
if (info != null && info.hasGeneric()) {
return Integer.toString(info.getGeneric());
}
return null;
}
},
代码示例来源:origin: OpenNMS/opennms
@Override
public String getValue(String parm, String parsedParm, Event event, EventUtil eventUtil) {
Snmp info = event.getSnmp();
if (info != null && info.getIdtext() != null) {
return info.getIdtext();
}
return null;
}
},
代码示例来源:origin: OpenNMS/opennms
@Override
public String getValue(String parm, String parsedParm, Event event, EventUtil eventUtil) {
Snmp info = event.getSnmp();
if (info != null && info.getCommunity() != null) {
return info.getCommunity();
}
return null;
}
},
代码示例来源:origin: OpenNMS/opennms
/**
* <p>setSnmpVersion</p>
*
* @param version a {@link java.lang.String} object.
* @return a {@link org.opennms.netmgt.model.events.EventBuilder} object.
*/
public EventBuilder setSnmpVersion(final String version) {
ensureSnmp();
m_event.getSnmp().setVersion(version);
return this;
}
代码示例来源:origin: OpenNMS/opennms
private void ensureSnmp() {
if (m_event.getSnmp() == null) {
m_event.setSnmp(new Snmp());
}
}
代码示例来源:origin: OpenNMS/opennms
public EventBuilder setCommunity(final String community) {
ensureSnmp();
m_event.getSnmp().setCommunity(community);
return this;
}
代码示例来源:origin: OpenNMS/opennms
/**
* <p>setEnterpriseId</p>
*
* @param enterprise a {@link java.lang.String} object.
* @return a {@link org.opennms.netmgt.model.events.EventBuilder} object.
*/
public EventBuilder setEnterpriseId(final String enterprise) {
ensureSnmp();
m_event.getSnmp().setId(enterprise);
return this;
}
代码示例来源:origin: OpenNMS/opennms
/**
* <p>setSpecific</p>
*
* @param specific a int.
* @return a {@link org.opennms.netmgt.model.events.EventBuilder} object.
*/
public EventBuilder setSpecific(final int specific) {
ensureSnmp();
m_event.getSnmp().setSpecific(specific);
return this;
}
代码示例来源:origin: OpenNMS/opennms
public EventBuilder setSnmpTimeStamp(final long timeStamp) {
ensureSnmp();
m_event.getSnmp().setTimeStamp(timeStamp);
return this;
}
代码示例来源:origin: OpenNMS/opennms
/**
* <p>setGeneric</p>
*
* @param generic a int.
* @return a {@link org.opennms.netmgt.model.events.EventBuilder} object.
*/
public EventBuilder setGeneric(final int generic) {
ensureSnmp();
m_event.getSnmp().setGeneric(generic);
return this;
}
代码示例来源:origin: org.opennms.features.events/org.opennms.features.events.daemon
@Override
public String getValue(String parm, String parsedParm, Event event, EventUtil eventUtil) {
Snmp info = event.getSnmp();
if (info != null && info.getIdtext() != null) {
return info.getIdtext();
}
return null;
}
},
代码示例来源:origin: org.opennms.features.events/org.opennms.features.events.daemon
@Override
public String getValue(String parm, String parsedParm, Event event, EventUtil eventUtil) {
Snmp info = event.getSnmp();
if (info != null && info.getCommunity() != null) {
return info.getCommunity();
}
return null;
}
},
内容来源于网络,如有侵权,请联系作者删除!