|
JASMI API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.agentpp.smi.SMIRepository
public class SMIRepository
The SMIRepository provides methods and services for managing
MIB modules.
| Constructor Summary | |
|---|---|
SMIRepository()
|
|
| Method Summary | |
|---|---|
void |
addObject(IObject object)
Adds an IObject to the MIB repository. |
java.util.Vector |
getChildren(IObject object)
Gets the children of a given object. |
java.util.Vector |
getChildren(IObjectID oid)
Gets the children of an object given by its object ID. |
java.util.Vector |
getChildren(java.lang.String objectName)
Gets the children of an object given by its name. |
java.util.Vector |
getDescendants(IObject object)
Gets the descendants of a given object. |
ITextualConvention |
getEffectiveSyntax(ISyntax syntax)
Get the effective syntax for a given ISyntax. |
IModule |
getModule(java.lang.String moduleName)
Gets a MIB module with a given name. |
java.util.Vector |
getModuleNames()
Gets a Vector of module names of this MIB repository. |
java.util.Enumeration |
getModulesSortedByName()
Gets an Enumeration of all modules sorted by name. |
java.util.Vector |
getNonOidObjects(boolean textualConventionsOnly)
Get all objects in the repository that do not have an object identifier. |
IObject |
getObject(IObjectID oid)
Gets an IObject with a given object ID. |
IObject |
getObject(java.lang.String name)
Gets a MIB object with a given name. |
IObject |
getObject(java.lang.String moduleName,
java.lang.String name)
Gets the MIB object with a given name from a given module. |
IObject |
getObjectByOID(java.lang.String oid)
Gets an IObject with a given object ID string. |
IObjectType |
getObjectClass(java.lang.String oid)
Gets the object class OBJECT-TYPE definition for the supplied instance OID. |
java.util.Vector |
getObjectClassOID(java.lang.String oid)
Gets the class OID of a given instance OID and the corresponding instance suffix. |
IObjectID |
getObjectID(java.lang.String name)
Gets the object ID for a given name. |
IObjectID |
getObjectID(java.lang.String moduleName,
java.lang.String name)
Gets the object ID for a given name. |
java.lang.String |
getObjectName(IObjectID oid)
Gets the object name for a given object ID. |
IObject[] |
getObjectsByName(java.lang.String name)
Gets all objects with a given name. |
IObject[] |
getObjectsByOid(IObjectID oid)
Gets all objects with a given OID. |
IObject[] |
getObjectsByOid(java.lang.String oid)
Gets all objects with a given OID string. |
IObject |
getParent(IObject object)
Gets the parent MIBObject for a given object |
java.lang.String |
getPath(IObjectID oid,
boolean withID)
Get the object name path for a given object ID. |
java.lang.String |
getPath(java.lang.String oid,
boolean withID)
Get the object name path for a given object ID. |
IObjectID |
makeObjectID(java.lang.String oid)
Creates an IObjectID from a dotted string or object name
path. |
int |
moduleCount()
Return the number of modules in the MIB repository. |
java.util.Enumeration |
modules()
Returns an Enumeration of all modules. |
java.util.Iterator |
modulesIterator()
Returns an Iterator of all modules. |
java.util.Enumeration |
objects()
Returns an Enumeration of all objects. |
java.util.Enumeration |
objectsByName()
Returns an Enumeration of all objects ordered by name. |
java.util.Iterator |
objectsOrderedByOccurance()
Returns an Iterator on the objects contained in this module
ordered by their occurance in the original (compiled) MIB module. |
java.lang.String |
printModule(java.lang.String moduleName)
Return the SMI definition of a given module. |
void |
remove(IModule module)
Remove an IModule including its content from the MIB
repository. |
boolean |
removeModule(java.lang.String name)
Removes a MIB module given by its module name. |
void |
removeObject(IObject object)
Removes the given object from the MIB repository. |
int |
size()
Return the size of the repository. |
void |
structureChanged()
This method should always called when the structure of the repository has been changed (i.e., a MIB module has been added or MIB objects have been added or deleted). |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SMIRepository()
| Method Detail |
|---|
public int size()
IRepository
size in interface IRepositorypublic int moduleCount()
IRepository
moduleCount in interface IRepositorypublic void addObject(IObject object)
IRepositoryIObject to the MIB repository. Modules should be added
before their objects are added, otherwise, after adding all objects,
IRepository.structureChanged() must be called to ensure, that the
modules know about their objects.
addObject in interface IRepositoryobject - an IObject instance.public java.lang.String getObjectName(IObjectID oid)
IRepository
getObjectName in interface IRepositoryoid - an object identifier.
public IObjectID getObjectID(java.lang.String name)
IRepository
getObjectID in interface IRepositoryname - an object name.
public IObjectID getObjectID(java.lang.String moduleName,
java.lang.String name)
IRepository
getObjectID in interface IRepositorymoduleName - the name of the MIB module to search for the object ID.name - an object name.
moduleName, null is returned.
public IObject getObject(java.lang.String moduleName,
java.lang.String name)
IRepository
getObject in interface IRepositorymoduleName - a module name.name - the object's name.
IObject instance if the requested object could be found, or
null otherwise.public java.util.Vector getChildren(java.lang.String objectName)
IRepository
getChildren in interface IRepositoryobjectName - an object name.
public java.util.Vector getChildren(IObjectID oid)
IRepository
getChildren in interface IRepositoryoid - an IObjectID instance.
public java.util.Vector getChildren(IObject object)
IRepository
getChildren in interface IRepositoryobject - an IObject instance.
public java.util.Vector getDescendants(IObject object)
IRepository
getDescendants in interface IRepositoryobject - an IObject instance.
public IObject getParent(IObject object)
IRepository
getParent in interface IRepositoryobject - an IObject instance.
IObject instance if there exists an object with an object ID
that matches the object ID object without its last sub-identifier.
In any other case null is returned.public IObject[] getObjectsByName(java.lang.String name)
IRepository
getObjectsByName in interface IRepositoryname - an object name.
IObject instances.public IObject[] getObjectsByOid(IObjectID oid)
IRepository
getObjectsByOid in interface IRepositoryoid - an IObjectID instance.
IObject instances.public void remove(IModule module)
IRepositoryIModule including its content from the MIB
repository.
remove in interface IRepositorymodule - an IModule instance.public void removeObject(IObject object)
IRepository
removeObject in interface IRepositoryobject - an IObject instance.public boolean removeModule(java.lang.String name)
IRepository
removeModule in interface IRepositoryname - a module name.
public IModule getModule(java.lang.String moduleName)
IRepository
getModule in interface IRepositorymoduleName - a module name.
IModule instance if such an instance could be found,
null otherwise.public IObject getObject(java.lang.String name)
IRepository
getObject in interface IRepositoryname - an object name, for example "sysDescr" or "SNMPv2-MIB.sysDescr".
IObject instance if such an instance could be found,
null otherwise.public IObject getObject(IObjectID oid)
IRepositoryIObject with a given object ID.
getObject in interface IRepositoryoid - an IObjectID.
IObject instance if such an instance could be found,
null otherwise.public java.util.Enumeration modules()
IRepository
modules in interface IRepositoryIModule instances.public java.util.Iterator modulesIterator()
IRepository
modulesIterator in interface IRepositoryIModule instances.public java.util.Enumeration getModulesSortedByName()
IRepository
getModulesSortedByName in interface IRepositoryIModule instances.public java.util.Vector getModuleNames()
IRepositoryVector of module names of this MIB repository.
getModuleNames in interface IRepositoryVector of Strings.public java.util.Enumeration objects()
IRepositoryEnumeration of all objects.
objects in interface IRepositoryEnumeration of IObject instances.public java.util.Enumeration objectsByName()
IRepositoryEnumeration of all objects ordered by name.
objectsByName in interface IRepositoryEnumeration of IObject instances.public java.util.Iterator objectsOrderedByOccurance()
IRepositoryIterator on the objects contained in this module
ordered by their occurance in the original (compiled) MIB module.
objectsOrderedByOccurance in interface IRepositoryIterator on the MIB objects of this module.public void structureChanged()
IRepository
structureChanged in interface IRepository
public java.lang.String getPath(IObjectID oid,
boolean withID)
IRepository
getPath in interface IRepositoryoid - an IObjectID instance to convert.withID - if true after each name, the corresponding sub-identifier
will be returned, for example "1.3.6.1" will return
"iso(1).org(3).dod(6).internet(1)".public java.util.Vector getNonOidObjects(boolean textualConventionsOnly)
IRepository
getNonOidObjects in interface IRepositorytextualConventionsOnly - if true only ITextualConvention instances are returned.
IObject instances.public java.lang.String printModule(java.lang.String moduleName)
IRepository
printModule in interface IRepositorymoduleName - a module name.
public IObjectID makeObjectID(java.lang.String oid)
IRepositoryIObjectID from a dotted string or object name
path.
makeObjectID in interface IRepositoryoid - a dotted String, for example "1.3.6.1.2" or "iso.org.dod.internet".
IObjectID. If a non-numerical OID string cannot be
resolved, then null will be returned.
public java.lang.String getPath(java.lang.String oid,
boolean withID)
IRepository
getPath in interface IRepositoryoid - a numerical OID string to convert.withID - if true after each name, the corresponding sub-identifier
will be returned, for example "1.3.6.1" will return
"iso(1).org(3).dod(6).internet(1)".public IObject getObjectByOID(java.lang.String oid)
IRepositoryIObject with a given object ID string.
getObjectByOID in interface IRepositoryoid - an OID string with numerical subidentifiers.
IObject instance if such an instance could be found,
null otherwise.public IObject[] getObjectsByOid(java.lang.String oid)
IRepository
getObjectsByOid in interface IRepositoryoid - an OID string with numerical subidentifiers.
IObject instances.public ITextualConvention getEffectiveSyntax(ISyntax syntax)
IRepositoryISyntax. The effective syntax
is the base syntax with possibly additional range restrictions or
enumerations.
getEffectiveSyntax in interface IRepositorysyntax - a ISyntax instance.
ITextualConvention instance containing a
ISyntax instance possibly indentical to 'syntax' and,
if available, a display hint String.
If 'syntax' is not of type SMI.SYN_CONVENTION or if its base syntax
cannot be determined, then syntax is returned.public java.util.Vector getObjectClassOID(java.lang.String oid)
IRepository
getObjectClassOID in interface IRepositoryoid - a dotted String.
Vector of two elements. The first contains the object
class OID as a dotted String with numerical sub-identifiers, if the
object class could be determined by the information in the
repository (otherwise the first element will be null).
The second element contains the instance OID suffix as a dotted
numerical String. If the object class is null, then the
second element is identical to oid.public IObjectType getObjectClass(java.lang.String oid)
IRepositorynull is returned.
See also IRepository.getObjectClassOID(String oid).
getObjectClass in interface IRepositoryoid - the instance OID as a dotted String.
null is returned.
|
JASMI API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||