MySnmpCrawler API

snmp.message.datatype
Class MySnmpCrawlerNull

java.lang.Object
  |
  +--org.opennms.protocols.snmp.SnmpNull
        |
        +--snmp.message.datatype.MySnmpCrawlerNull
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable, SnmpDatatype, org.opennms.protocols.snmp.SnmpSyntax

public class MySnmpCrawlerNull
extends org.opennms.protocols.snmp.SnmpNull
implements SnmpDatatype, java.lang.Cloneable

Represents NULL.

Version:
$Revision: 0.1 $ $Date: 2004/03/09 06:03:49 $
Author:
Scott Cheng
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.opennms.protocols.snmp.SnmpNull
ASNTYPE
 
Constructor Summary
MySnmpCrawlerNull()
          The default Constructor.
MySnmpCrawlerNull(MySnmpCrawlerNull second)
          The copy Constructor constructs the MySnmpCrawlerNull object that is identical to the passed object.
 
Method Summary
 java.lang.Object clone()
          Creates a new object that is a duplicate of the current object.
 org.opennms.protocols.snmp.SnmpSyntax duplicate()
          Creates a new object that is a duplicate of the current object.
 java.lang.String getJavaDataType()
          Gets the string description of the expected java datatype.
 java.lang.Object getJavaDataValue()
          Gets the Java object value corresponding to the the SnmpSyntax object.
 boolean isValidJavaDatatype(java.lang.Class c)
          Checks to see if the exptected Class type equals to the passed Class object.
 boolean isValidJavaDatatype(java.lang.Object o)
          Checks if the expected datatype of the Java object value matches to the passed Java object value.
 void setSnmpDataValue(java.lang.Object o)
          Sets the Java object value into the SnmpSyntax object.
static boolean validateJavaDatatype(java.lang.Object o)
          Validates the Java object value with the expected datatype.
 
Methods inherited from class org.opennms.protocols.snmp.SnmpNull
decodeASN, encodeASN, toString, typeId
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.opennms.protocols.snmp.SnmpSyntax
decodeASN, encodeASN, typeId
 

Constructor Detail

MySnmpCrawlerNull

public MySnmpCrawlerNull()
The default Constructor.


MySnmpCrawlerNull

public MySnmpCrawlerNull(MySnmpCrawlerNull second)
The copy Constructor constructs the MySnmpCrawlerNull object that is identical to the passed object.

Parameters:
second - The object to be copied from.
Method Detail

setSnmpDataValue

public void setSnmpDataValue(java.lang.Object o)
                      throws SnmpException
Sets the Java object value into the SnmpSyntax object.

Specified by:
setSnmpDataValue in interface SnmpDatatype
Parameters:
o - The Java object value.
Throws:
SnmpException - Thrown when the Java object value does not match to the expected datatype in the SnmpSyntax object.

getJavaDataValue

public java.lang.Object getJavaDataValue()
                                  throws SnmpException
Gets the Java object value corresponding to the the SnmpSyntax object.

Specified by:
getJavaDataValue in interface SnmpDatatype
Returns:
The Java object value corresponding to the the SnmpSyntax object.
Throws:
SnmpException - Thrown when any error occurs during converting the SnmpSyntax value to the Java object.

isValidJavaDatatype

public boolean isValidJavaDatatype(java.lang.Object o)
Checks if the expected datatype of the Java object value matches to the passed Java object value.

Specified by:
isValidJavaDatatype in interface SnmpDatatype
Parameters:
o - The Java object value.
Returns:
True if matched to the expected type, otherwise false.

isValidJavaDatatype

public boolean isValidJavaDatatype(java.lang.Class c)
Checks to see if the exptected Class type equals to the passed Class object.

Specified by:
isValidJavaDatatype in interface SnmpDatatype
Parameters:
c - The Class object to be checked.
Returns:
True if matched to the expected type, otherwise false.

getJavaDataType

public java.lang.String getJavaDataType()
Gets the string description of the expected java datatype.

Specified by:
getJavaDataType in interface SnmpDatatype
Returns:
The string description of the expected java datatype.

clone

public java.lang.Object clone()
Creates a new object that is a duplicate of the current object.

Overrides:
clone in class org.opennms.protocols.snmp.SnmpNull
Returns:
The newly created duplicate object.

duplicate

public org.opennms.protocols.snmp.SnmpSyntax duplicate()
Creates a new object that is a duplicate of the current object.

Specified by:
duplicate in interface org.opennms.protocols.snmp.SnmpSyntax
Overrides:
duplicate in class org.opennms.protocols.snmp.SnmpNull
Returns:
The newly created duplicate object.

validateJavaDatatype

public static boolean validateJavaDatatype(java.lang.Object o)
Validates the Java object value with the expected datatype.

Returns:
True if matched to the expected type, otherwise false.

MySnmpCrawler API