SourceForge.net Logo

org.netsnmp.ASN
Class NO_SUCH_INSTANCE

java.lang.Object
  |
  +--org.netsnmp.ASN.ASNValue
        |
        +--org.netsnmp.ASN.NO_SUCH_INSTANCE
All Implemented Interfaces:
Comparable, Serializable

public class NO_SUCH_INSTANCE
extends ASNValue

Class used to substitute for an object when the object is not found in an agent. NOTE: Whether or not an agent will actually return this in a pdu depends on the agent implementation. Agents may return a NULL object instead.

Author:
Andrew E. Page aepage@users.sourceforge.net
See Also:
Serialized Form

Field Summary
static NO_SUCH_INSTANCE NO_SUCH_INSTANCE
           
static ASN_TYPE type
           
 
Method Summary
 int asn_type()
           
 boolean toBoolean()
          Converts the value to a boolean.
 int toInt()
          Converts the value to a java int.
 long toInt64()
          Converts the value to java long.
 Object toJavaObject()
          Converts the value to a Java Object
 int[] toOBJECTID()
          Converts the value to an OBJECTOID
 byte[] toOctetString()
          Converts the value to an integer.
 ASN_TYPE type()
           
 
Methods inherited from class org.netsnmp.ASN.ASNValue
compareTo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NO_SUCH_INSTANCE

public static final NO_SUCH_INSTANCE NO_SUCH_INSTANCE

type

public static final ASN_TYPE type
Method Detail

asn_type

public int asn_type()
Specified by:
asn_type in class ASNValue

type

public ASN_TYPE type()
Specified by:
type in class ASNValue

toBoolean

public boolean toBoolean()
                  throws NetSNMPNoSuchInstance
Converts the value to a boolean.

Overrides:
toBoolean in class ASNValue
Throws:
NetSNMPNoSuchInstance - if this value is not a BOOLEAN

toInt

public int toInt()
          throws NetSNMPNoSuchInstance
Converts the value to a java int.

Overrides:
toInt in class ASNValue
Throws:
NetSNMPNoSuchInstance - if this value is not some integer type

toInt64

public long toInt64()
             throws NetSNMPNoSuchInstance
Converts the value to java long.

Overrides:
toInt64 in class ASNValue
Throws:
NetSNMPNoSuchInstance - if this value is not some long type

toOctetString

public byte[] toOctetString()
                     throws NetSNMPNoSuchInstance
Converts the value to an integer.

Overrides:
toOctetString in class ASNValue
Throws:
NetSNMPNoSuchInstance - if this value is not an OCTECT_STR

toOBJECTID

public int[] toOBJECTID()
                 throws NetSNMPNoSuchInstance
Converts the value to an OBJECTOID

Overrides:
toOBJECTID in class ASNValue
Throws:
NetSNMPNoSuchInstance - if this value cannot be converted to an OBJECTID

toJavaObject

public Object toJavaObject()
Description copied from class: ASNValue
Converts the value to a Java Object

Specified by:
toJavaObject in class ASNValue

SourceForge.net Logo