Package com.snmp4j.smi
Interface SmiObject
- All Superinterfaces:
Comparable<SmiObject>
- All Known Subinterfaces:
SmiModule,SmiModuleCompliance,SmiModuleIdentity,SmiNotificationType,SmiObjectType,SmiObjectTypeIndex,SmiTextualConvention
The SmiObject interface represents the SMI information of a MIB object.
- Version:
- 1.12.0
- Author:
- Frank Fock
-
Method Summary
Modifier and TypeMethodDescriptionString[]Gets the ASN.1 comments associated with this SMI object.Gets all child objects below this SMI object.Gets the description text of the SMI object.Gets the OBJECT-NAME of the SMI object.org.snmp4j.smi.OIDgetOID()Gets the object-identifier of the SMI object (if present).Gets the parent object for this SMI object.Gets the REFERENCE clause content of the SMI object.intGets the SMI syntax as defined bySMIConstantsfor this OBJECT-TYPE.Gets the STATUS clause content of the SMI object.getType()Gets the SMI type of the SMI object.Methods inherited from interface java.lang.Comparable
compareTo
-
Method Details
-
getObjectName
String getObjectName()Gets the OBJECT-NAME of the SMI object.- Returns:
- an object-name.
-
getOID
org.snmp4j.smi.OID getOID()Gets the object-identifier of the SMI object (if present).- Returns:
- an
OIDornullfor object-names or textual-conventions.
-
getSmiSyntax
int getSmiSyntax()Gets the SMI syntax as defined bySMIConstantsfor this OBJECT-TYPE. If this SmiObject is not of typeSmiType.OBJECT_TYPE_SCALAR,SmiType.OBJECT_TYPE_COLUMNand not of typeSmiType.TEXTUAL_CONVENTIONthen zero is returned.- Returns:
- the SMI BER syntax identifier or 0 if this object has no syntax.
-
getDescription
String getDescription()Gets the description text of the SMI object.- Returns:
- the description without the enclosing double quotes.
-
getType
SmiType getType()Gets the SMI type of the SMI object. The OBJECT-TYPE construct is used for scalar, tabular, row (entry), and columnar objects in SMI. SNMP4J-SMI-PRO distinguishes between these types.- Returns:
- the SMI type of this SMI object.
-
getChildren
Gets all child objects below this SMI object. A child object is found if the following statements are all true:- it has an OID that starts with its parent's OID and is at least one sub-identifier longer
- there is no object with a shorter OID that is also child of its parent (regarding the first rule)
SmiTextualConventioninstances, this method always returnsnull.- Returns:
- the child objects of this SMI object.
-
getParent
SmiObject getParent()Gets the parent object for this SMI object. A parent object is found if the following statements are all true:- it has an OID that is the prefix of its child's OID and is at least one sub-identifier shorter
- there is no object with a longer OID that is also parent of the child (regarding the first rule)
SmiTextualConventioninstances, this method always returnsnull.- Returns:
- the parent object of this SMI object.
-
getReference
String getReference()Gets the REFERENCE clause content of the SMI object.- Returns:
- an ASCII string.
-
getStatus
SmiStatus getStatus()Gets the STATUS clause content of the SMI object.- Returns:
- a
SmiStatusinstance.
-
getAsn1Comments
String[] getAsn1Comments()Gets the ASN.1 comments associated with this SMI object. The length of the array is always fixed per API version. If a comment is not available, single or all array elements might benull.- Returns:
- an array of ASN.1 comments. The array is never
nullbut elements could benull.
-