本文整理了Java中org.snmp4j.Snmp.setLocalEngine()
方法的一些代码示例,展示了Snmp.setLocalEngine()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Snmp.setLocalEngine()
方法的具体详情如下:
包路径:org.snmp4j.Snmp
类名称:Snmp
方法名:setLocalEngine
[英]Sets the local engine ID for the SNMP entity represented by this Snmp
instance. This is a convenience method that sets the local engine ID in the associated MPv3
and USM
.
[中]设置此Snmp
实例表示的SNMP实体的本地引擎ID。这是一种方便的方法,可以在相关的MPv3
和USM
中设置本地引擎ID。
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.snmp4j
private void configureEngine(Snmp snmp, Map settings) {
int engineBoots = 0;
Integer bc =
(Integer) ArgumentParser.getValue(settings, oBootCounter, 0);
if (bc != null) {
engineBoots = bc;
snmp.getUSM().setEngineBoots(engineBoots);
}
int engineTime = 0;
OctetString localEngineID =
createOctetString((String)
ArgumentParser.getValue(settings, oLocalEngineID, 0),
null);
if (localEngineID == null) {
if (snmp.getLocalEngineID() == null) {
snmp.setLocalEngine(MPv3.createLocalEngineID(), engineBoots,
engineTime);
}
}
else {
snmp.setLocalEngine(localEngineID.getValue(), engineBoots, engineTime);
}
}
代码示例来源:origin: org.kaazing/snmp4j
if (localEngineID == null) {
if (snmp.getLocalEngineID() == null) {
snmp.setLocalEngine(MPv3.createLocalEngineID(), engineBoots,
engineTime);
snmp.setLocalEngine(localEngineID.getValue(), engineBoots, engineTime);
代码示例来源:origin: org.kaazing/snmp4j
SecurityModels.getInstance().addSecurityModel(usm);
if (authoritativeEngineID != null) {
snmp.setLocalEngine(authoritativeEngineID.getValue(), 0, 0);
代码示例来源:origin: org.snmp4j/snmp4j
SecurityModels.getInstance().addSecurityModel(usm);
if (authoritativeEngineID != null) {
snmp.setLocalEngine(authoritativeEngineID.getValue(), 0, 0);
代码示例来源:origin: Stratio/ingestion
0);
SecurityModels.getInstance().addSecurityModel(usm);
snmp.setLocalEngine(localEngineID, 0, 0);
0);
SecurityModels.getInstance().addSecurityModel(usm);
trap_snmp.setLocalEngine(localEngineID, 0, 0);
内容来源于网络,如有侵权,请联系作者删除!