本文整理汇总了Java中com.sun.jmx.snmp.SnmpValue类的典型用法代码示例。如果您正苦于以下问题:Java SnmpValue类的具体用法?Java SnmpValue怎么用?Java SnmpValue使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SnmpValue类属于com.sun.jmx.snmp包,在下文中一共展示了SnmpValue类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: get
import com.sun.jmx.snmp.SnmpValue; //导入依赖的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);
}
示例2: set
import com.sun.jmx.snmp.SnmpValue; //导入依赖的package包/类
/**
* Set the value of a scalar variable
*/
public SnmpValue set(SnmpValue x, long var, Object data)
throws SnmpStatusException {
switch((int)var) {
case 4:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 3:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 2:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 1:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
default:
break;
}
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
}
示例3: check
import com.sun.jmx.snmp.SnmpValue; //导入依赖的package包/类
/**
* Check the value of a scalar variable
*/
public void check(SnmpValue x, long var, Object data)
throws SnmpStatusException {
switch((int) var) {
case 4:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 3:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 2:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 1:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
default:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
}
}
示例4: get
import com.sun.jmx.snmp.SnmpValue; //导入依赖的package包/类
/**
* Get the value of a scalar variable
*/
public SnmpValue get(long var, Object data)
throws SnmpStatusException {
switch((int)var) {
case 3:
return new SnmpInt(node.getJvmMemManagerState());
case 2:
return new SnmpString(node.getJvmMemManagerName());
case 1:
throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
default:
break;
}
throw new SnmpStatusException(SnmpStatusException.noSuchObject);
}
示例5: set
import com.sun.jmx.snmp.SnmpValue; //导入依赖的package包/类
/**
* Set the value of a scalar variable
*/
public SnmpValue set(SnmpValue x, long var, Object data)
throws SnmpStatusException {
switch((int)var) {
case 3:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 2:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 1:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
default:
break;
}
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
}
示例6: check
import com.sun.jmx.snmp.SnmpValue; //导入依赖的package包/类
/**
* Check the value of a scalar variable
*/
public void check(SnmpValue x, long var, Object data)
throws SnmpStatusException {
switch((int) var) {
case 3:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 2:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 1:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
default:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
}
}
示例7: get
import com.sun.jmx.snmp.SnmpValue; //导入依赖的package包/类
/**
* Get the value of a scalar variable
*/
public SnmpValue get(long var, Object data)
throws SnmpStatusException {
switch((int)var) {
case 3:
return new SnmpInt(node.getJvmJITCompilerTimeMonitoring());
case 2:
return new SnmpCounter64(node.getJvmJITCompilerTimeMs());
case 1:
return new SnmpString(node.getJvmJITCompilerName());
default:
break;
}
throw new SnmpStatusException(SnmpStatusException.noSuchObject);
}
示例8: get
import com.sun.jmx.snmp.SnmpValue; //导入依赖的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.getJvmClassesVerboseLevel());
case 3:
return new SnmpCounter64(node.getJvmClassesUnloadedCount());
case 2:
return new SnmpCounter64(node.getJvmClassesTotalLoadedCount());
case 1:
return new SnmpGauge(node.getJvmClassesLoadedCount());
default:
break;
}
throw new SnmpStatusException(SnmpStatusException.noSuchObject);
}
示例9: get
import com.sun.jmx.snmp.SnmpValue; //导入依赖的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);
}
示例10: get
import com.sun.jmx.snmp.SnmpValue; //导入依赖的package包/类
/**
* Get the value of a scalar variable
*/
public SnmpValue get(long var, Object data)
throws SnmpStatusException {
switch((int)var) {
case 2:
return new SnmpString(node.getJvmRTBootClassPathItem());
case 1:
throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
default:
break;
}
throw new SnmpStatusException(SnmpStatusException.noSuchObject);
}
示例11: set
import com.sun.jmx.snmp.SnmpValue; //导入依赖的package包/类
/**
* Set the value of a scalar variable
*/
public SnmpValue set(SnmpValue x, long var, Object data)
throws SnmpStatusException {
switch((int)var) {
case 2:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 1:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
default:
break;
}
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
}
示例12: check
import com.sun.jmx.snmp.SnmpValue; //导入依赖的package包/类
/**
* Check the value of a scalar variable
*/
public void check(SnmpValue x, long var, Object data)
throws SnmpStatusException {
switch((int) var) {
case 2:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 1:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
default:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
}
}
示例13: get
import com.sun.jmx.snmp.SnmpValue; //导入依赖的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);
}
示例14: set
import com.sun.jmx.snmp.SnmpValue; //导入依赖的package包/类
/**
* Set the value of a scalar variable
*/
public SnmpValue set(SnmpValue x, long var, Object data)
throws SnmpStatusException {
switch((int)var) {
case 3:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 2:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
default:
break;
}
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
}
示例15: check
import com.sun.jmx.snmp.SnmpValue; //导入依赖的package包/类
/**
* Check the value of a scalar variable
*/
public void check(SnmpValue x, long var, Object data)
throws SnmpStatusException {
switch((int) var) {
case 3:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 2:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
default:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
}
}