本文整理汇总了Java中com.sun.jmx.snmp.SnmpVarBind.setEndOfMibView方法的典型用法代码示例。如果您正苦于以下问题:Java SnmpVarBind.setEndOfMibView方法的具体用法?Java SnmpVarBind.setEndOfMibView怎么用?Java SnmpVarBind.setEndOfMibView使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.sun.jmx.snmp.SnmpVarBind
的用法示例。
在下文中一共展示了SnmpVarBind.setEndOfMibView方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getNext
import com.sun.jmx.snmp.SnmpVarBind; //导入方法依赖的package包/类
/**
* Processes a <CODE>getNext</CODE> operation. It will throw an exception for V1 requests or it will set exceptions within the list for V2 requests..
*
* @param inRequest The SnmpMibRequest object holding the list of variables to be retrieved.
*
* @exception SnmpStatusException An error occurred during the operation.
*/
@Override
public void getNext(SnmpMibRequest inRequest) throws SnmpStatusException {
SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
SnmpErrorHandlerAgent.class.getName(),
"getNext", "GetNext in Exception");
if(inRequest.getVersion() == SnmpDefinitions.snmpVersionOne)
throw new SnmpStatusException(SnmpStatusException.noSuchName);
Enumeration<SnmpVarBind> l = inRequest.getElements();
while(l.hasMoreElements()) {
SnmpVarBind varbind = l.nextElement();
varbind.setEndOfMibView();
}
}
示例2: getBulk
import com.sun.jmx.snmp.SnmpVarBind; //导入方法依赖的package包/类
/**
* Processes a <CODE>getBulk</CODE> operation. It will throw an exception if the request is a V1 one or it will set exceptions within the list for V2 ones.
*
* @param inRequest The SnmpMibRequest object holding the list of variable to be retrieved.
*
* @exception SnmpStatusException An error occurred during the operation.
*/
@Override
public void getBulk(SnmpMibRequest inRequest, int nonRepeat, int maxRepeat)
throws SnmpStatusException {
SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
SnmpErrorHandlerAgent.class.getName(),
"getBulk", "GetBulk in Exception");
if(inRequest.getVersion() == SnmpDefinitions.snmpVersionOne)
throw new SnmpStatusException(SnmpDefinitions.snmpRspGenErr, 0);
Enumeration<SnmpVarBind> l = inRequest.getElements();
while(l.hasMoreElements()) {
SnmpVarBind varbind = l.nextElement();
varbind.setEndOfMibView();
}
}