当前位置: 首页>>代码示例>>Java>>正文


Java SnmpStatusException.noSuchObject方法代码示例

本文整理汇总了Java中com.sun.jmx.snmp.SnmpStatusException.noSuchObject方法的典型用法代码示例。如果您正苦于以下问题:Java SnmpStatusException.noSuchObject方法的具体用法?Java SnmpStatusException.noSuchObject怎么用?Java SnmpStatusException.noSuchObject使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.sun.jmx.snmp.SnmpStatusException的用法示例。


在下文中一共展示了SnmpStatusException.noSuchObject方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: get

import com.sun.jmx.snmp.SnmpStatusException; //导入方法依赖的package包/类
/**
 * Get the value of a scalar variable
 */
public SnmpValue get(long var, Object data)
    throws SnmpStatusException {
    switch((int)var) {
        case 4:
            return new SnmpInt(node.getJvmOSProcessorCount());

        case 3:
            return new SnmpString(node.getJvmOSVersion());

        case 2:
            return new SnmpString(node.getJvmOSArch());

        case 1:
            return new SnmpString(node.getJvmOSName());

        default:
            break;
    }
    throw new SnmpStatusException(SnmpStatusException.noSuchObject);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:24,代码来源:JvmOSMeta.java

示例2: validateOid

import com.sun.jmx.snmp.SnmpStatusException; //导入方法依赖的package包/类
/**
 * Validate the specified OID.
 *
 * <p>
 * @param oid The OID array.
 *
 * @param pos The position in the array.
 *
 * @exception SnmpStatusException If the validation fails.
 */
final void validateOid(long[] oid, int pos) throws SnmpStatusException {
    final int length= oid.length;

    // Control the length of the oid
    //
    if (pos +2 >= length) {
        throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
    }

    // Check that the entry identifier is specified
    //
    if (oid[pos] != nodeId) {
        throw new SnmpStatusException(SnmpStatusException.noSuchObject);
    }
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:26,代码来源:SnmpMibTable.java

示例3: getAttributeName

import com.sun.jmx.snmp.SnmpStatusException; //导入方法依赖的package包/类
/**
 * Return the name of the attribute corresponding to the SNMP variable identified by "id".
 */
public String getAttributeName(long id)
    throws SnmpStatusException {
    switch((int)id) {
        case 3:
            return "JvmJITCompilerTimeMonitoring";

        case 2:
            return "JvmJITCompilerTimeMs";

        case 1:
            return "JvmJITCompilerName";

        default:
            break;
    }
    throw new SnmpStatusException(SnmpStatusException.noSuchObject);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:21,代码来源:JvmCompilationMeta.java

示例4: getChild

import com.sun.jmx.snmp.SnmpStatusException; //导入方法依赖的package包/类
SnmpMibNode getChild(long id) throws SnmpStatusException {

        // first we need to retrieve the identifier in the list of children
        //
        final int pos= getInsertAt(id);
        if (pos >= nbChildren) {
            throw new SnmpStatusException(SnmpStatusException.noSuchObject);
        }

        if (varList[pos] != (int) id) {
            throw new SnmpStatusException(SnmpStatusException.noSuchObject);
        }

        // Access the node
        //
        SnmpMibNode child = null;
        try {
            child = children.elementAtNonSync(pos);
        } catch(ArrayIndexOutOfBoundsException e) {
            throw new SnmpStatusException(SnmpStatusException.noSuchObject);
        }
        if (child == null) {
            throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
        }
        return child;
    }
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:27,代码来源:SnmpMibOid.java

示例5: getAttributeName

import com.sun.jmx.snmp.SnmpStatusException; //导入方法依赖的package包/类
/**
 * Return the name of the attribute corresponding to the SNMP variable identified by "id".
 */
public String getAttributeName(long id)
    throws SnmpStatusException {
    switch((int)id) {
        case 4:
            return "JvmClassesVerboseLevel";

        case 3:
            return "JvmClassesUnloadedCount";

        case 2:
            return "JvmClassesTotalLoadedCount";

        case 1:
            return "JvmClassesLoadedCount";

        default:
            break;
    }
    throw new SnmpStatusException(SnmpStatusException.noSuchObject);
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:24,代码来源:JvmClassLoadingMeta.java

示例6: getAttributeName

import com.sun.jmx.snmp.SnmpStatusException; //导入方法依赖的package包/类
/**
 * Return the name of the attribute corresponding to the SNMP variable identified by "id".
 */
public String getAttributeName(long id)
    throws SnmpStatusException {
    switch((int)id) {
        case 4:
            return "JvmOSProcessorCount";

        case 3:
            return "JvmOSVersion";

        case 2:
            return "JvmOSArch";

        case 1:
            return "JvmOSName";

        default:
            break;
    }
    throw new SnmpStatusException(SnmpStatusException.noSuchObject);
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:24,代码来源:JvmOSMeta.java

示例7: findHandlingNode

import com.sun.jmx.snmp.SnmpStatusException; //导入方法依赖的package包/类
@Override
void findHandlingNode(SnmpVarBind varbind,
                      long[] oid, int depth,
                      SnmpRequestTree handlers)
    throws SnmpStatusException {


    final int length = oid.length;
    SnmpMibNode node = null;

    if (handlers == null)
        throw new SnmpStatusException(SnmpStatusException.snmpRspGenErr);

    if (depth > length) {
        // Nothing is left... the oid is not valid
        throw new SnmpStatusException(SnmpStatusException.noSuchObject);
    } else if (depth == length) {
        // The oid is not complete...
        throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
    } else {
        // Some children variable or subobject is being querried
        // getChild() will raise an exception if no child is found.
        //
        final SnmpMibNode child= getChild(oid[depth]);

        // XXXX zzzz : what about null children?
        //             (variables for nested groups)
        // if child==null, then we're dealing with a variable or
        // a table: we register this node.
        // This behaviour should be overriden in subclasses,
        // in particular in group meta classes: the group
        // meta classes that hold tables should take care
        // of forwarding this call to all the tables involved.
        //
        if (child == null)
            handlers.add(this,depth,varbind);
        else
            child.findHandlingNode(varbind,oid,depth+1,handlers);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:41,代码来源:SnmpMibOid.java

示例8: get

import com.sun.jmx.snmp.SnmpStatusException; //导入方法依赖的package包/类
/**
 * Get the value of a scalar variable
 */
public SnmpValue get(long var, Object data)
    throws SnmpStatusException {
    switch((int)var) {
        case 3:
            return new SnmpString(node.getJvmMemMgrRelPoolName());

        case 2:
            return new SnmpString(node.getJvmMemMgrRelManagerName());

        default:
            break;
    }
    throw new SnmpStatusException(SnmpStatusException.noSuchObject);
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:18,代码来源:JvmMemMgrPoolRelEntryMeta.java

示例9: getAttributeName

import com.sun.jmx.snmp.SnmpStatusException; //导入方法依赖的package包/类
/**
 * Return the name of the attribute corresponding to the SNMP variable identified by "id".
 */
public String getAttributeName(long id)
    throws SnmpStatusException {
    switch((int)id) {
        case 2:
            return "JvmRTLibraryPathItem";

        case 1:
            return "JvmRTLibraryPathIndex";

        default:
            break;
    }
    throw new SnmpStatusException(SnmpStatusException.noSuchObject);
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:18,代码来源:JvmRTLibraryPathEntryMeta.java

示例10: get

import com.sun.jmx.snmp.SnmpStatusException; //导入方法依赖的package包/类
/**
 * Get the value of a scalar variable
 */
public SnmpValue get(long var, Object data)
    throws SnmpStatusException {
    switch((int)var) {
        case 6:
            return new SnmpInt(node.getJvmThreadCpuTimeMonitoring());

        case 5:
            return new SnmpInt(node.getJvmThreadContentionMonitoring());

        case 4:
            return new SnmpCounter64(node.getJvmThreadTotalStartedCount());

        case 3:
            return new SnmpCounter(node.getJvmThreadPeakCount());

        case 2:
            return new SnmpGauge(node.getJvmThreadDaemonCount());

        case 1:
            return new SnmpGauge(node.getJvmThreadCount());

        case 10: {
            throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
            }

        case 7:
            return new SnmpCounter64(node.getJvmThreadPeakCountReset());

        default:
            break;
    }
    throw new SnmpStatusException(SnmpStatusException.noSuchObject);
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:37,代码来源:JvmThreadingMeta.java

示例11: get

import com.sun.jmx.snmp.SnmpStatusException; //导入方法依赖的package包/类
/**
 * Get the value of a scalar variable
 */
public SnmpValue get(long var, Object data)
    throws SnmpStatusException {
    switch((int)var) {
        case 3:
            return new SnmpCounter64(node.getJvmMemGCTimeMs());

        case 2:
            return new SnmpCounter64(node.getJvmMemGCCount());

        default:
            break;
    }
    throw new SnmpStatusException(SnmpStatusException.noSuchObject);
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:18,代码来源:JvmMemGCEntryMeta.java

示例12: getAttributeName

import com.sun.jmx.snmp.SnmpStatusException; //导入方法依赖的package包/类
/**
 * Return the name of the attribute corresponding to the SNMP variable identified by "id".
 */
public String getAttributeName(long id)
    throws SnmpStatusException {
    switch((int)id) {
        case 3:
            return "JvmMemMgrRelPoolName";

        case 2:
            return "JvmMemMgrRelManagerName";

        default:
            break;
    }
    throw new SnmpStatusException(SnmpStatusException.noSuchObject);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:18,代码来源:JvmMemMgrPoolRelEntryMeta.java

示例13: getAttributeName

import com.sun.jmx.snmp.SnmpStatusException; //导入方法依赖的package包/类
/**
 * Return the name of the attribute corresponding to the SNMP variable identified by "id".
 */
public String getAttributeName(long id)
    throws SnmpStatusException {
    switch((int)id) {
        case 6:
            return "JvmThreadCpuTimeMonitoring";

        case 5:
            return "JvmThreadContentionMonitoring";

        case 4:
            return "JvmThreadTotalStartedCount";

        case 3:
            return "JvmThreadPeakCount";

        case 2:
            return "JvmThreadDaemonCount";

        case 1:
            return "JvmThreadCount";

        case 10: {
            throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
            }

        case 7:
            return "JvmThreadPeakCountReset";

        default:
            break;
    }
    throw new SnmpStatusException(SnmpStatusException.noSuchObject);
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:37,代码来源:JvmThreadingMeta.java

示例14: registerGetException

import com.sun.jmx.snmp.SnmpStatusException; //导入方法依赖的package包/类
@Override
public void registerGetException(SnmpVarBind var,
                                 SnmpStatusException exception)
    throws SnmpStatusException {
    // The index in the exception must correspond to
    // the SNMP index ...
    //
    if (version == SnmpDefinitions.snmpVersionOne)
        throw new SnmpStatusException(exception, getVarIndex(var)+1);

    if (var == null)
        throw exception;

    // If we're doing a getnext ==> endOfMibView
    if (getnextflag) {
        var.value = SnmpVarBind.endOfMibView;
        return;
    }

    final int errorCode = mapGetException(exception.getStatus(),
                                          version);

    // Now take care of V2 errorCodes that can be stored
    // in the varbind itself:
    if (errorCode ==
        SnmpStatusException.noSuchObject)
        // noSuchObject => noSuchObject
        var.value= SnmpVarBind.noSuchObject;

    else if (errorCode ==
             SnmpStatusException.noSuchInstance)
        // noSuchInstance => noSuchInstance
        var.value= SnmpVarBind.noSuchInstance;

    else
        throw new SnmpStatusException(errorCode, getVarIndex(var)+1);

}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:39,代码来源:SnmpRequestTree.java

示例15: get

import com.sun.jmx.snmp.SnmpStatusException; //导入方法依赖的package包/类
/**
 * Get the value of a scalar variable
 */
public SnmpValue get(long var, Object data)
    throws SnmpStatusException {
    switch((int)var) {
        case 23: {
            throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
            }

        case 22: {
            throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
            }

        case 21: {
            throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
            }

        case 9:
            return new SnmpInt(node.getJvmRTBootClassPathSupport());

        case 20: {
            throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
            }

        case 8:
            return new SnmpString(node.getJvmRTManagementSpecVersion());

        case 7:
            return new SnmpString(node.getJvmRTSpecVersion());

        case 6:
            return new SnmpString(node.getJvmRTSpecVendor());

        case 5:
            return new SnmpString(node.getJvmRTSpecName());

        case 4:
            return new SnmpString(node.getJvmRTVMVersion());

        case 3:
            return new SnmpString(node.getJvmRTVMVendor());

        case 12:
            return new SnmpCounter64(node.getJvmRTStartTimeMs());

        case 11:
            return new SnmpCounter64(node.getJvmRTUptimeMs());

        case 2:
            return new SnmpString(node.getJvmRTVMName());

        case 1:
            return new SnmpString(node.getJvmRTName());

        case 10:
            return new SnmpInt(node.getJvmRTInputArgsCount());

        default:
            break;
    }
    throw new SnmpStatusException(SnmpStatusException.noSuchObject);
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:64,代码来源:JvmRuntimeMeta.java


注:本文中的com.sun.jmx.snmp.SnmpStatusException.noSuchObject方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。