本文整理汇总了Java中com.sun.jmx.snmp.agent.SnmpMibRequest类的典型用法代码示例。如果您正苦于以下问题:Java SnmpMibRequest类的具体用法?Java SnmpMibRequest怎么用?Java SnmpMibRequest使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SnmpMibRequest类属于com.sun.jmx.snmp.agent包,在下文中一共展示了SnmpMibRequest类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createMibRequest
import com.sun.jmx.snmp.agent.SnmpMibRequest; //导入依赖的package包/类
SnmpMibRequest createMibRequest(Vector<SnmpVarBind> vblist,
int protocolVersion,
Object userData) {
// This is an optimization:
// The SnmpMibRequest created in the check() phase is
// reused in the set() phase.
//
if (type == pduSetRequestPdu && mibRequest != null)
return mibRequest;
//This is a request comming from an SnmpV3AdaptorServer.
//Full power.
SnmpMibRequest result = null;
if(incRequest != null) {
result = SnmpMibAgent.newMibRequest(engine,
reqPdu,
vblist,
protocolVersion,
userData,
incRequest.getPrincipal(),
incRequest.getSecurityLevel(),
incRequest.getSecurityModel(),
incRequest.getContextName(),
incRequest.getAccessContext());
} else {
result = SnmpMibAgent.newMibRequest(reqPdu,
vblist,
protocolVersion,
userData);
}
// If we're doing the check() phase, we store the SnmpMibRequest
// so that we can reuse it in the set() phase.
//
if (type == pduWalkRequest)
mibRequest = result;
return result;
}