MySnmpCrawler API

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

Field Summary
private static SnmpDatatypeFactory instance
           
private  java.util.ArrayList snmpTypeList
           
 
Constructor Summary
private SnmpDatatypeFactory()
           
 
Method Summary
static SnmpDatatypeFactory getInstance()
          Gets the singleton object of the SnmpDatatypeFactory.
 SnmpDatatype getProtoSnmpDataType(byte asnType)
          Gets the prototype object of SnmpDataType.
 SnmpDatatype getSnmpDataType(byte asnType, java.lang.Object javaValue)
          Gets the SnmpDataType object from the prototype object list and sets the Java object value to the SnmpDataType object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

instance

private static SnmpDatatypeFactory instance

snmpTypeList

private java.util.ArrayList snmpTypeList
Constructor Detail

SnmpDatatypeFactory

private SnmpDatatypeFactory()
Method Detail

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.

MySnmpCrawler API