本文整理了Java中org.snmp4j.smi.Null
类的一些代码示例,展示了Null
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Null
类的具体详情如下:
包路径:org.snmp4j.smi.Null
类名称:Null
[英]The Null
class represents SMI Null and the derived SMIv2 exception syntaxes.
[中]Null
类表示SMI Null和派生的SMIv2异常语法。
代码示例来源:origin: stackoverflow.com
function Null() {}
Null.prototype = null;
var object = new Null();
console.log(Object.getPrototypeOf(object) === null); // false :(
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.snmp4j
/**
* Returns the syntax of this Null variable.
* @return
* {@link SMIConstants#SYNTAX_NULL} or one of the exception syntaxes
* {@link SMIConstants#EXCEPTION_NO_SUCH_OBJECT},
* {@link SMIConstants#EXCEPTION_NO_SUCH_INSTANCE}, or
* {@link SMIConstants#EXCEPTION_END_OF_MIB_VIEW}
* @since 1.7
*/
public final long toLong() {
return getSyntax();
}
代码示例来源:origin: org.snmp4j/snmp4j
public void setSyntax(int syntax) {
if ((syntax != SMIConstants.SYNTAX_NULL) && (!isExceptionSyntax(syntax))) {
throw new IllegalArgumentException("Syntax " + syntax +
" is incompatible with Null type");
}
this.syntax = syntax;
}
代码示例来源:origin: org.snmp4j/snmp4j
finished = true;
else if (Null.isExceptionSyntax(vb.getVariable().getSyntax())) {
finished = true;
for (int i=Math.max(0,lastRowIndex); i<lastRowIndex + rootOIDs.length; i++) {
VariableBinding next = (VariableBinding) respPDU.get(i).clone();
next.setVariable(new Null());
request.add(next);
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.snmp4j
public Null(int exceptionSyntax) {
setSyntax(exceptionSyntax);
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.snmp4j
finished = true;
else if (Null.isExceptionSyntax(vb.getVariable().getSyntax())) {
finished = true;
for (int i=Math.max(0,lastRowIndex); i<lastRowIndex + rootOIDs.length; i++) {
VariableBinding next = (VariableBinding) respPDU.get(i).clone();
next.setVariable(new Null());
request.add(next);
代码示例来源:origin: org.kaazing/snmp4j
public Null(int exceptionSyntax) {
setSyntax(exceptionSyntax);
}
代码示例来源:origin: org.kaazing/snmp4j
public Object clone() {
return new Null(this.syntax);
}
代码示例来源:origin: org.kaazing/snmp4j
finished = true;
else if (Null.isExceptionSyntax(vb.getVariable().getSyntax())) {
finished = true;
VariableBinding next =
(VariableBinding) respPDU.get(respPDU.size() - 1).clone();
next.setVariable(new Null());
request.set(0, next);
request.setRequestID(new Integer32(0));
代码示例来源:origin: org.kaazing/snmp4j
/**
* Returns the syntax of this Null variable.
* @return
* {@link SMIConstants#SYNTAX_NULL} or one of the exception syntaxes
* {@link SMIConstants#EXCEPTION_NO_SUCH_OBJECT},
* {@link SMIConstants#EXCEPTION_NO_SUCH_INSTANCE}, or
* {@link SMIConstants#EXCEPTION_END_OF_MIB_VIEW}
* @since 1.7
*/
public final int toInt() {
return getSyntax();
}
代码示例来源:origin: org.kaazing/snmp4j
public void setSyntax(int syntax) {
if ((syntax != SMIConstants.SYNTAX_NULL) && (!isExceptionSyntax(syntax))) {
throw new IllegalArgumentException("Syntax " + syntax +
" is incompatible with Null type");
}
this.syntax = syntax;
}
代码示例来源:origin: org.snmp4j/snmp4j
public Null(int exceptionSyntax) {
setSyntax(exceptionSyntax);
}
代码示例来源:origin: org.snmp4j/snmp4j
public Object clone() {
return new Null(this.syntax);
}
代码示例来源:origin: org.kaazing/snmp4j
public String toString() {
switch (getSyntax()) {
case SMIConstants.EXCEPTION_NO_SUCH_OBJECT:
return "noSuchObject";
case SMIConstants.EXCEPTION_NO_SUCH_INSTANCE:
return "noSuchInstance";
case SMIConstants.EXCEPTION_END_OF_MIB_VIEW:
return "endOfMibView";
}
return "Null";
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.snmp4j
public void setSyntax(int syntax) {
if ((syntax != SMIConstants.SYNTAX_NULL) && (!isExceptionSyntax(syntax))) {
throw new IllegalArgumentException("Syntax " + syntax +
" is incompatible with Null type");
}
this.syntax = syntax;
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.snmp4j
public Object clone() {
return new Null(this.syntax);
}
代码示例来源:origin: org.snmp4j/snmp4j
/**
* Returns the syntax of this Null variable.
* @return
* {@link SMIConstants#SYNTAX_NULL} or one of the exception syntaxes
* {@link SMIConstants#EXCEPTION_NO_SUCH_OBJECT},
* {@link SMIConstants#EXCEPTION_NO_SUCH_INSTANCE}, or
* {@link SMIConstants#EXCEPTION_END_OF_MIB_VIEW}
* @since 1.7
*/
public final int toInt() {
return getSyntax();
}
代码示例来源:origin: org.snmp4j/snmp4j
/**
* Checks whether this variable represents an exception like
* noSuchObject, noSuchInstance, and endOfMibView.
*
* @return {@code true} if the syntax of this variable is an instance of
* {@code Null} and its syntax equals one of the following:
* <UL>
* <LI>{@link SMIConstants#EXCEPTION_NO_SUCH_OBJECT}</LI>
* <LI>{@link SMIConstants#EXCEPTION_NO_SUCH_INSTANCE}</LI>
* <LI>{@link SMIConstants#EXCEPTION_END_OF_MIB_VIEW}</LI>
* </UL>
*/
public boolean isException() {
return Null.isExceptionSyntax(getSyntax());
}
代码示例来源:origin: org.opennms.core.snmp/org.opennms.core.snmp.implementations.snmp4j
@Override
public SnmpValue getNull() {
return new Snmp4JValue(new Null());
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.snmp4j
public String toString() {
switch (getSyntax()) {
case SMIConstants.EXCEPTION_NO_SUCH_OBJECT:
return "noSuchObject";
case SMIConstants.EXCEPTION_NO_SUCH_INSTANCE:
return "noSuchInstance";
case SMIConstants.EXCEPTION_END_OF_MIB_VIEW:
return "endOfMibView";
}
return "Null";
}
内容来源于网络,如有侵权,请联系作者删除!