JASMI API

com.agentpp.smi
Interface IModule

All Superinterfaces:
java.lang.Comparable, IObject, java.io.Serializable

public interface IModule
extends IObject

IModule represents a SNMP MIB module as well as the corresponding SMIv2 MODULE-IDENTITY construct.

Version:
1.8.1
Author:
Frank Fock

Field Summary
 
Fields inherited from interface com.agentpp.smi.IObject
AGENT_CAPABILITIES, MODULE_COMPLIANCE, MODULE_IDENTITY, NOTIFICATION_GROUP, NOTIFICATION_TYPE, OBJECT_GROUP, OBJECT_IDENTITY, OBJECT_NAME, OBJECT_TYPE, TEXTUAL_CONVENTION, TRAP_TYPE
 
Method Summary
 java.lang.String getContactInfo()
           
 java.lang.String getCopyrightComment()
          Get the ASN.1 comment located at the beginning of the original SMI file.
 java.lang.String getCopyrightCommentEnd()
          Get the ASN.1 comment located at the end of the original SMI file.
 IImport[] getImports()
           
 java.lang.String getImportSource(java.lang.String objectName)
          Returns the module name of the module from which the specified object is imported.
 java.lang.String[] getImportSources()
          Get the list of all MIB modules the receiver imports from.
 java.util.Vector getImportSources(java.lang.String objectName)
          Gets all names of MIB modules from which an object with the given name is imported by this MIB module.
 java.lang.String getLastUpdated()
           
 java.lang.String getModuleName()
           
 IObject getObject(java.lang.String objectName)
          Gets the MIB object for a given object name.
 IObject getObjectByOID(java.lang.String oid)
          Gets the MIB object for a given object identifier (OID).
 java.util.Vector getObjectsVector()
          Get the objects of the module as a Vector of IObject instances.
 java.lang.String getOrganization()
           
 IRevision[] getRevisions()
           
 int getSMIVersion()
          Get the SMI version of the MIB module.
 boolean hasCopyrightComment()
           
 boolean hasCopyrightCommentEnd()
           
 boolean hasImports()
           
 boolean hasRevisions()
           
 boolean imports(java.lang.String objectName)
          Checks whether this MIB module imports an object with the given name.
 java.util.Enumeration objects()
          Return a Enumeration of the IObject instances of this MIB module.
 com.objectspace.jgl.OrderedMap objectsByName()
          Return an OrderedMap that contains the IObject instances of this MIB module ordered by the object names.
 com.objectspace.jgl.OrderedMap objectsByOid()
          Return an OrderedMap that contains the IObject instances of this MIB module ordered by the OIDs of the objects.
 java.util.Collection objectsOrderedByOccurance()
          Returns an Iterator on the objects contained in this module ordered by their occurance in the original (compiled) MIB module.
 int size()
          Return the size of the MIB module.
 
Methods inherited from interface com.agentpp.smi.IObject
getComment, getDeepClone, getDescription, getModuleID, getName, getObjectID, getPrintableOid, getReference, getStatus, getType, getTypeString, hasComment, hasDescription, hasReference, hasStatus, isStructural
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

getObject

IObject getObject(java.lang.String objectName)
Gets the MIB object for a given object name.

Parameters:
objectName - an object name.
Returns:
an IObject instance if this module containes a MIB object with a name that equals objectName or null otherwise.

getObjectByOID

IObject getObjectByOID(java.lang.String oid)
Gets the MIB object for a given object identifier (OID).

Parameters:
oid - an OID String as a sequence of positive 32bit integer values separated by dots.
Returns:
an IObject instance if this module containes a MIB object with an OID that equals oid or null otherwise.

getObjectsVector

java.util.Vector getObjectsVector()
Get the objects of the module as a Vector of IObject instances.

Returns:
a Vector of IObject instances.

size

int size()
Return the size of the MIB module. The size is equal to the count of MIBObjects returned by the objects() enumeration.

Returns:
the size of the module.

objects

java.util.Enumeration objects()
Return a Enumeration of the IObject instances of this MIB module.

Returns:
an Enumeration.

objectsByOid

com.objectspace.jgl.OrderedMap objectsByOid()
Return an OrderedMap that contains the IObject instances of this MIB module ordered by the OIDs of the objects.

Returns:
an OrderedMap.

objectsOrderedByOccurance

java.util.Collection objectsOrderedByOccurance()
Returns an Iterator on the objects contained in this module ordered by their occurance in the original (compiled) MIB module.

Returns:
an Iterator on the MIB objects of this module.

objectsByName

com.objectspace.jgl.OrderedMap objectsByName()
Return an OrderedMap that contains the IObject instances of this MIB module ordered by the object names.

Returns:
an OrderedMap.

getModuleName

java.lang.String getModuleName()

getImportSources

java.lang.String[] getImportSources()
Get the list of all MIB modules the receiver imports from.

Returns:
an array of module names.

hasImports

boolean hasImports()

getImports

IImport[] getImports()

getImportSource

java.lang.String getImportSource(java.lang.String objectName)
Returns the module name of the module from which the specified object is imported.

Parameters:
objectName - an object, type, or textual convention name.
Returns:
the module name of the source module.
Since:
2.0.2

getOrganization

java.lang.String getOrganization()

getLastUpdated

java.lang.String getLastUpdated()

getContactInfo

java.lang.String getContactInfo()

getSMIVersion

int getSMIVersion()
Get the SMI version of the MIB module.

Returns:
1 for SMIv1 or 2 for SMIv2.

hasRevisions

boolean hasRevisions()

getRevisions

IRevision[] getRevisions()

getCopyrightComment

java.lang.String getCopyrightComment()
Get the ASN.1 comment located at the beginning of the original SMI file.

Returns:
a String with any ASN.1 comments lines located before "DEFINITIONS ::= BEGIN".

hasCopyrightComment

boolean hasCopyrightComment()

getCopyrightCommentEnd

java.lang.String getCopyrightCommentEnd()
Get the ASN.1 comment located at the end of the original SMI file.

Returns:
a String with any ASN.1 comments lines located after "END".

hasCopyrightCommentEnd

boolean hasCopyrightCommentEnd()

imports

boolean imports(java.lang.String objectName)
Checks whether this MIB module imports an object with the given name.

Parameters:
objectName - an object name.
Returns:
true if an object with the name denoted by objectName is imported by this MIB module, false otherwise.

getImportSources

java.util.Vector getImportSources(java.lang.String objectName)
Gets all names of MIB modules from which an object with the given name is imported by this MIB module.

Parameters:
objectName - an object name.
Returns:
a Vector containing zero or more MIB module names of the source MIB modules of the given object.

JASMI API

JASMI 3
Copyright 2001-2010 Frank Fock
All Rights Reserved