snmp.message.datatype
Class SnmpDatatypeFactory
java.lang.Object
|
+--snmp.message.datatype.SnmpDatatypeFactory
- public class SnmpDatatypeFactory
- extends java.lang.Object
This factory class contains the prototype objects that are used to create
the new SnmpDatatype objects.
- Version:
- $Revision: 0.1 $ $Date: 2004/03/09 06:03:50 $
- Author:
- Scott Cheng
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
instance
private static SnmpDatatypeFactory instance
snmpTypeList
private java.util.ArrayList snmpTypeList
SnmpDatatypeFactory
private SnmpDatatypeFactory()
getSnmpDataType
public SnmpDatatype getSnmpDataType(byte asnType,
java.lang.Object javaValue)
throws SnmpException
- Gets the SnmpDataType object from the prototype object list
and sets the Java object value to the SnmpDataType object.
- Returns:
- The SnmpDataType object.
- Throws:
SnmpDatatype
- Thrown when the ASN.1 type is unknown or
any error is occured during creating the SnmpDataType object.
SnmpException
getProtoSnmpDataType
public SnmpDatatype getProtoSnmpDataType(byte asnType)
throws SnmpException
- Gets the prototype object of SnmpDataType.
- Returns:
- The SnmpDataType object.
- Throws:
SnmpDatatype
- Thrown when the ASN.1 type is unknown.
SnmpException
getInstance
public static SnmpDatatypeFactory getInstance()
- Gets the singleton object of the SnmpDatatypeFactory.
- Returns:
- Singleton object of the SnmpDatatypeFactory.