MySnmpCrawler API

snmp.message.datatype
Class MySnmpCrawlerObjectId

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

public class MySnmpCrawlerObjectId
extends org.opennms.protocols.snmp.SnmpObjectId
implements SnmpDatatype

This class is the subclass of the SnmpObjectId.

See Also:
Serialized Form

Field Summary
static java.lang.Class expectType
           
static java.lang.String javaDataType
           
 
Fields inherited from class org.opennms.protocols.snmp.SnmpObjectId
ASNTYPE
 
Constructor Summary
MySnmpCrawlerObjectId()
          The default Constructor.
MySnmpCrawlerObjectId(MySnmpCrawlerObjectId second)
          The copy Constructor constructs the MySnmpCrawlerObjectId object that is identical to the passed object.
MySnmpCrawlerObjectId(java.lang.String strOid)
          Constructs a SnmpObjectId object with the String 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.SnmpObjectId
append, append, append, compare, compare, compare, decodeASN, encodeASN, equals, getIdentifiers, getLength, hashCode, isRootOf, prepend, prepend, prepend, setIdentifiers, setIdentifiers, toString, typeId
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.opennms.protocols.snmp.SnmpSyntax
decodeASN, encodeASN, typeId
 

Field Detail

javaDataType

public static final java.lang.String javaDataType
See Also:
Constant Field Values

expectType

public static java.lang.Class expectType
Constructor Detail

MySnmpCrawlerObjectId

public MySnmpCrawlerObjectId()
The default Constructor.


MySnmpCrawlerObjectId

public MySnmpCrawlerObjectId(java.lang.String strOid)
Constructs a SnmpObjectId object with the String object.

Parameters:
strOid - The String object.

MySnmpCrawlerObjectId

public MySnmpCrawlerObjectId(MySnmpCrawlerObjectId second)
The copy Constructor constructs the MySnmpCrawlerObjectId 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.

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.SnmpObjectId
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.SnmpObjectId
Returns:
The newly created duplicate object.

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.

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