wttools.protocols.snmp
Class SnmpObjectIdentifier

java.lang.Object
  |
  +--wttools.protocols.snmp.SnmpValue
        |
        +--wttools.protocols.snmp.SnmpObjectIdentifier
All Implemented Interfaces:
SnmpDataTypeEnumeration

public final class SnmpObjectIdentifier
extends SnmpValue

SnmpInteger32.java Created: Saturday Dec 08 2001

Version:
$Revision: 1.1 $
Author:
Kantharaj B R

Fields inherited from interface wttools.protocols.snmp.SnmpDataTypeEnumeration
ASN_APPLICATION, ASN_BIT_STRING, ASN_BIT8, ASN_BOOLEAN, ASN_CONSTRUCTOR, ASN_CONTEXT, ASN_EXTENSION_ID, ASN_INTEGER, ASN_LONG_LENGTH, ASN_NULL, ASN_OBJECT_ID, ASN_OCTECT_STRING, ASN_PRIMITIVE, ASN_PRIVATE, ASN_SEQUENCE, ASN_SET, ASN_UNIVERSAL, snmpDataTypeBitString, snmpDataTypeInteger, snmpDataTypeInteger32, snmpDataTypeNullObject, snmpDataTypeObjectId, snmpDataTypeOctet, snmpDataTypeUnknown, snmpString_BitString, snmpString_Integer, snmpString_Integer32, snmpString_NullObject, snmpString_ObjectId, snmpString_Octet
 
Constructor Summary
SnmpObjectIdentifier()
          SnmpObjectIdentifier constructor with no parameters
SnmpObjectIdentifier(int[] oId, int length)
          SnmpObjectIdentifier constructor with array of Int and Int as the parameter
SnmpObjectIdentifier(SnmpObjectIdentifier snmpOid)
          SnmpObjectIdentifier constructor with SnmpObjectIdentifier as the parameter
SnmpObjectIdentifier(java.lang.String oIdName)
          SnmpObjectIdentifier constructor with String as the parameter
 
Method Summary
 void cleanUpOid()
          cleanUpOid every thing in Object Identifier is deleted and made to point to null
 void decode(DecodeFromBuffer buffer)
          decode decodes the SnmpObjectIdentifier according to BER encoding from a buffer
 void encode(EncodeInBuffer buffer)
          encode encodes the SnmpObjectIdentifier according to BER encoding and stores in a buffer
 int[] getComponentsOfOid()
          getComponentsOfOid returns array of integers which are components of Object Identifier
 int getLength()
          getLength returns length of Object Identifier
 int getLengthOfOid()
          getLengthOfOid returns length of Object Identifier
 int getType()
          getType function returns the SnmpObjectIdentifier data type
 java.lang.String getTypeName()
          getTypeName function returns the SnmpObjectIdentifier data type in String.
 void resolveNameToIntArray(java.lang.String name)
          resolveNameToIntArray resolves a given string to an array of integers deleting all dots
 void setComponentsOfOid(int[] oId)
          setComponentsOfOid making of an Object Identifier takes place given array of integers
 void setComponentsOfOid(int[] oId, int oIdLength)
          setComponentsOfOid making of an Object Identifier takes place given array of integers and it's length
 java.lang.String toString()
          toString converts the SnmpObjectIdentifier to String for displaying
 java.lang.StringBuffer toString(java.lang.StringBuffer sb)
          toString used in toString() function to convert the SnmpInteger32 to String for displaying
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SnmpObjectIdentifier

public SnmpObjectIdentifier()
SnmpObjectIdentifier constructor with no parameters

SnmpObjectIdentifier

public SnmpObjectIdentifier(int[] oId,
                            int length)
SnmpObjectIdentifier constructor with array of Int and Int as the parameter
Parameters:
value - an int[]
value - an int .

SnmpObjectIdentifier

public SnmpObjectIdentifier(java.lang.String oIdName)
SnmpObjectIdentifier constructor with String as the parameter
Parameters:
value - an String
int - value.

SnmpObjectIdentifier

public SnmpObjectIdentifier(SnmpObjectIdentifier snmpOid)
SnmpObjectIdentifier constructor with SnmpObjectIdentifier as the parameter
Parameters:
value - an SnmpObjectIdentifier value.
Method Detail

resolveNameToIntArray

public void resolveNameToIntArray(java.lang.String name)
                           throws java.lang.NumberFormatException
resolveNameToIntArray resolves a given string to an array of integers deleting all dots
Parameters:
value - an String value.

getComponentsOfOid

public final int[] getComponentsOfOid()
getComponentsOfOid returns array of integers which are components of Object Identifier
Returns:
value an int[] value.

setComponentsOfOid

public final void setComponentsOfOid(int[] oId,
                                     int oIdLength)
setComponentsOfOid making of an Object Identifier takes place given array of integers and it's length
Parameters:
value - int[] and int<.code>

setComponentsOfOid

public final void setComponentsOfOid(int[] oId)
setComponentsOfOid making of an Object Identifier takes place given array of integers
Parameters:
value - int[] and int<.code>

getLengthOfOid

public final int getLengthOfOid()
getLengthOfOid returns length of Object Identifier
Returns:
value an int[] value.

getLength

public final int getLength()
getLength returns length of Object Identifier
Overrides:
getLength in class SnmpValue
Returns:
value an int value.

getType

public final int getType()
getType function returns the SnmpObjectIdentifier data type
Overrides:
getType in class SnmpValue
Returns:
an int value

getTypeName

public final java.lang.String getTypeName()
getTypeName function returns the SnmpObjectIdentifier data type in String.
Overrides:
getTypeName in class SnmpValue
Returns:
an String value

cleanUpOid

public final void cleanUpOid()
cleanUpOid every thing in Object Identifier is deleted and made to point to null
Returns:
an void value

encode

public void encode(EncodeInBuffer buffer)
encode encodes the SnmpObjectIdentifier according to BER encoding and stores in a buffer
Overrides:
encode in class SnmpValue
Parameters:
value - an EncodeInBuffer value.

decode

public void decode(DecodeFromBuffer buffer)
decode decodes the SnmpObjectIdentifier according to BER encoding from a buffer
Overrides:
decode in class SnmpValue
Parameters:
value - an DecodeFromBuffer value.

toString

public java.lang.String toString()
toString converts the SnmpObjectIdentifier to String for displaying
Overrides:
toString in class java.lang.Object
Returns:
value an String value.

toString

public java.lang.StringBuffer toString(java.lang.StringBuffer sb)
toString used in toString() function to convert the SnmpInteger32 to String for displaying
Parameters:
value - StringBuffer value.
Returns:
value an StringBuffer value.


Copyright © GNU, wttools developers Team.