net.percederberg.mib.type
Class SnmpObjectType

java.lang.Object
  |
  +--net.percederberg.mib.type.Type
        |
        +--net.percederberg.mib.type.SnmpObjectType

public class SnmpObjectType
extends Type

A class for handling type information for an SNMP object type.

Version:
1.1
Author:
Per Cederberg, per@percederberg.net

Field Summary
static int CURRENT_STATUS
          The current status constant.
static int DEPRECATED_STATUS
          The deprecated status constant.
static int MANDATORY_STATUS
          The mandatory status constant.
static int NO_ACCESS
          The access constant for no access.
static int NOTIFY_ACCESS
          The access constant for notify access.
static int OBSOLETE_STATUS
          The obsolete status constant.
static int OPTIONAL_STATUS
          The optional status constant.
static int READ_ACCESS
          The access constant for read-only access.
static int READ_CREATE_ACCESS
          The access constant for read-create access.
static int READ_WRITE_ACCESS
          The access constant for read-write access.
static int WRITE_ACCESS
          The access constant for write-only access.
 
Constructor Summary
SnmpObjectType(Type baseType, int access, int status)
          Creates a new SNMP object type with the given parameters.
SnmpObjectType(Type baseType, int access, int status, java.lang.String descr, java.util.Vector index, java.lang.Object defval)
          Creates a new SNMP object type with the given parameters.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Checks if this type equals another.
 java.lang.String getAccess()
          Returns the access string.
 Type getBaseType()
          Returns the basic type.
 java.lang.Object getDefaultValue()
          Returns the default value.
 java.lang.String getDescription()
          Returns the type description.
 java.lang.String getIndices()
          Returns the table indices (as a string).
 java.lang.String getStatus()
          Returns the status string.
 java.lang.String toString()
          Returns a description of this type.
 void transferType(TypeConverter converter)
          Transfers the type information from this type to a type converter object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NO_ACCESS

public static final int NO_ACCESS
The access constant for no access. This value is used in both SNMPv1 and SNMPv2.

See Also:
Constant Field Values

NOTIFY_ACCESS

public static final int NOTIFY_ACCESS
The access constant for notify access. This value is only used in SNMPv2.

See Also:
Constant Field Values

READ_ACCESS

public static final int READ_ACCESS
The access constant for read-only access. This value is used in both SNMPv1 and SNMPv2.

See Also:
Constant Field Values

WRITE_ACCESS

public static final int WRITE_ACCESS
The access constant for write-only access. This value is only used in SNMPv1.

See Also:
Constant Field Values

READ_WRITE_ACCESS

public static final int READ_WRITE_ACCESS
The access constant for read-write access. This value is used in both SNMPv1 and SNMPv2.

See Also:
Constant Field Values

READ_CREATE_ACCESS

public static final int READ_CREATE_ACCESS
The access constant for read-create access. This value is only used in SNMPv2.

See Also:
Constant Field Values

MANDATORY_STATUS

public static final int MANDATORY_STATUS
The mandatory status constant. This value is only used in SNMPv1.

See Also:
Constant Field Values

OPTIONAL_STATUS

public static final int OPTIONAL_STATUS
The optional status constant. This value is only used in SNMPv1.

See Also:
Constant Field Values

CURRENT_STATUS

public static final int CURRENT_STATUS
The current status constant. This value is only used in SNMPv2.

See Also:
Constant Field Values

DEPRECATED_STATUS

public static final int DEPRECATED_STATUS
The deprecated status constant. This value is only used in SNMPv2.

See Also:
Constant Field Values

OBSOLETE_STATUS

public static final int OBSOLETE_STATUS
The obsolete status constant. This value is used in both SNMPv1 and SNMPv2.

See Also:
Constant Field Values
Constructor Detail

SnmpObjectType

public SnmpObjectType(Type baseType,
                      int access,
                      int status)
Creates a new SNMP object type with the given parameters. The description is set to an empty string.

Parameters:
baseType - the basic type
access - an access constant value
status - a status constant value

SnmpObjectType

public SnmpObjectType(Type baseType,
                      int access,
                      int status,
                      java.lang.String descr,
                      java.util.Vector index,
                      java.lang.Object defval)
Creates a new SNMP object type with the given parameters.

Parameters:
baseType - the basic type
access - an access constant value
status - a status constant value
descr - a string description (or null)
index - the table indices (or null)
defval - the default value (or null)
Method Detail

getAccess

public java.lang.String getAccess()
Returns the access string.

Returns:
the access string

getBaseType

public Type getBaseType()
Returns the basic type.

Returns:
the basic type

getDefaultValue

public java.lang.Object getDefaultValue()
Returns the default value.

Returns:
the default value

getDescription

public java.lang.String getDescription()
Returns the type description.

Returns:
the type description

getIndices

public java.lang.String getIndices()
Returns the table indices (as a string).

Returns:
the table indices

getStatus

public java.lang.String getStatus()
Returns the status string.

Returns:
the status string

equals

public boolean equals(java.lang.Object obj)
Checks if this type equals another.

Specified by:
equals in class Type
Parameters:
obj - an object
Returns:
true if the types are equal, false otherwise

toString

public java.lang.String toString()
Returns a description of this type.

Specified by:
toString in class Type
Returns:
a description of the type

transferType

public void transferType(TypeConverter converter)
Transfers the type information from this type to a type converter object. The calling conventions declared in the TypeConverter class are followed.

Specified by:
transferType in class Type
Parameters:
converter - a type converter