本文整理汇总了Java中com.sun.jmx.snmp.internal.SnmpAccessControlModel类的典型用法代码示例。如果您正苦于以下问题:Java SnmpAccessControlModel类的具体用法?Java SnmpAccessControlModel怎么用?Java SnmpAccessControlModel使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SnmpAccessControlModel类属于com.sun.jmx.snmp.internal包,在下文中一共展示了SnmpAccessControlModel类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: AcmChecker
import com.sun.jmx.snmp.internal.SnmpAccessControlModel; //导入依赖的package包/类
AcmChecker(SnmpMibRequest req) {
engine = (SnmpEngineImpl) req.getEngine();
//We are in V3 architecture, ACM is in the picture.
if(engine != null) {
if(engine.isCheckOidActivated()) {
try {
if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
SnmpMib.class.getName(),
"AcmChecker(SnmpMibRequest)",
"SNMP V3 Access Control to be done");
}
model = (SnmpAccessControlModel)
engine.getAccessControlSubSystem().
getModel(SnmpDefinitions.snmpVersionThree);
principal = req.getPrincipal();
securityLevel = req.getSecurityLevel();
pduType = req.getPdu().type;
version = req.getRequestPduVersion();
securityModel = req.getSecurityModel();
contextName = req.getAccessContextName();
l = new LongList();
if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
final StringBuilder strb = new StringBuilder()
.append("Will check oid for : principal : ")
.append(principal)
.append("; securityLevel : ").append(securityLevel)
.append("; pduType : ").append(pduType)
.append("; version : ").append(version)
.append("; securityModel : ").append(securityModel)
.append("; contextName : ").append(contextName);
SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
SnmpMib.class.getName(),
"AcmChecker(SnmpMibRequest)", strb.toString());
}
}catch(SnmpUnknownModelException e) {
if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
SnmpMib.class.getName(),
"AcmChecker(SnmpMibRequest)",
"Unknown Model, no ACM check.");
}
}
}
}
}