com.agentpp.explorer.script.external
Interface MIB


public interface MIB

This interface provides methods for accessing MIB module information via the "mib" context of the MIB Explorer script API. The MIB context provides services to load/unload MIB modules, retrieve and exploit MIB object definitions, and manipulating OID values.

Since:
1.5 qversion 1.5.11

Method Summary
 IModule getModule(java.lang.String moduleName)
          Gets the module with the given module name.
 java.util.List getModuleNamesInRepository()
          Gets the MIB module names of all MIBs in the current MIB repository.
 java.util.Vector getModules()
          Gets all currently loaded MIB modules.
 java.lang.Boolean loadModule(java.lang.String moduleName)
          Loads a MIB module from the MIB repository of MIB Explorer unless the module is already loaded.
 IObjectID makeOID(java.lang.String oid)
          Makes a new IObjectID instance from an OID String.
 java.lang.String trimOID(java.lang.String oid)
          Trims the given OID by one subidentifier and returns the resulting OID.
 void unloadModule(java.lang.String moduleName)
          Unload the given MIB module.
 

Method Detail

loadModule

java.lang.Boolean loadModule(java.lang.String moduleName)
Loads a MIB module from the MIB repository of MIB Explorer unless the module is already loaded.

Parameters:
moduleName - the module name of a MIB, for example
IF-MIB
.
Returns:
true if the module has been loaded successfully or if it had been already loaded, false if moduleName does not denote a MIB module of the current repository.

getModule

IModule getModule(java.lang.String moduleName)
Gets the module with the given module name.

Parameters:
moduleName -
Returns:
the requested MIB module if the given module could be found, null otherwise.

getModules

java.util.Vector getModules()
Gets all currently loaded MIB modules.

Returns:
a Vector containing IModule instance representing all currently loaded MIB modules for this script.

getModuleNamesInRepository

java.util.List getModuleNamesInRepository()
Gets the MIB module names of all MIBs in the current MIB repository.

Returns:
a List of strings representing MIB module names.

unloadModule

void unloadModule(java.lang.String moduleName)
Unload the given MIB module.

Parameters:
moduleName - the name of the MIB module to unload.

trimOID

java.lang.String trimOID(java.lang.String oid)
Trims the given OID by one subidentifier and returns the resulting OID.

Parameters:
oid - a String representing an OID.
Returns:
an OID String with n-1 subidentifiers, where n is the number of subidentifiers of oid. If n is 1 or 0, an empty String is returned.

makeOID

IObjectID makeOID(java.lang.String oid)
Makes a new IObjectID instance from an OID String.

Parameters:
oid - a String representing an OID, for example "ifDescr.1".
Returns:
an IObjectID instance if oid is a valid OID, null otherwise.

Copyright 2003-2011, Frank Fock, All Rights Reserved. http://www.mibexplorer.com