本文整理汇总了Java中com.sun.jmx.snmp.SnmpStatusException.noSuchName方法的典型用法代码示例。如果您正苦于以下问题:Java SnmpStatusException.noSuchName方法的具体用法?Java SnmpStatusException.noSuchName怎么用?Java SnmpStatusException.noSuchName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.sun.jmx.snmp.SnmpStatusException
的用法示例。
在下文中一共展示了SnmpStatusException.noSuchName方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: get
import com.sun.jmx.snmp.SnmpStatusException; //导入方法依赖的package包/类
/**
* Processes a <CODE>get</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 variable to be retrieved.
*
* @exception SnmpStatusException An error occurred during the operation.
*/
@Override
public void get(SnmpMibRequest inRequest) throws SnmpStatusException {
SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
SnmpErrorHandlerAgent.class.getName(),
"get", "Get 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.setNoSuchObject();
}
}
示例2: getNext
import com.sun.jmx.snmp.SnmpStatusException; //导入方法依赖的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();
}
}
示例3: addEntryCb
import com.sun.jmx.snmp.SnmpStatusException; //导入方法依赖的package包/类
/**
* This callback is called by the associated metadata object
* when a new table entry has been registered in the
* table metadata.
*
* This method will update the <code>entries</code> list.
*
* @param pos The position at which the new entry was inserted
* in the table.
* @param row The row OID of the new entry
* @param name The ObjectName of the new entry (as specified by the
* factory)
* @param entry The new entry (as returned by the factory)
* @param meta The table metadata object.
*
**/
public void addEntryCb(int pos, SnmpOid row, ObjectName name,
Object entry, SnmpMibTable meta)
throws SnmpStatusException {
try {
if (entries != null) entries.add(pos,entry);
} catch (Exception e) {
throw new SnmpStatusException(SnmpStatusException.noSuchName);
}
}