|
JASMI API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface IRepository
This interfaces specifies methods for MIB repositories.
| 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 dottedString)
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()
Deprecated. Use modulesIterator() instead. |
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 moduleName)
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). |
| Method Detail |
|---|
int size()
int moduleCount()
void addObject(IObject object)
IObject to the MIB repository. Modules should be added
before their objects are added, otherwise, after adding all objects,
structureChanged() must be called to ensure, that the
modules know about their objects.
object - an IObject instance.java.lang.String getObjectName(IObjectID oid)
oid - an object identifier.
IObjectID getObjectID(java.lang.String name)
name - an object name.
IObjectID getObjectID(java.lang.String moduleName,
java.lang.String name)
moduleName - the name of the MIB module to search for the object ID.name - an object name.
moduleName, null is returned.
IObject getObject(java.lang.String moduleName,
java.lang.String name)
moduleName - a module name.name - the object's name.
IObject instance if the requested object could be found, or
null otherwise.java.util.Vector getChildren(java.lang.String objectName)
objectName - an object name.
java.util.Vector getChildren(IObjectID oid)
oid - an IObjectID instance.
java.util.Vector getChildren(IObject object)
object - an IObject instance.
java.util.Vector getDescendants(IObject object)
object - an IObject instance.
IObject getParent(IObject object)
object - 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.IObject[] getObjectsByName(java.lang.String name)
name - an object name.
IObject instances.IObject[] getObjectsByOid(IObjectID oid)
oid - an IObjectID instance.
IObject instances.IObject[] getObjectsByOid(java.lang.String oid)
oid - an OID string with numerical subidentifiers.
IObject instances.void remove(IModule module)
IModule including its content from the MIB
repository.
module - an IModule instance.void removeObject(IObject object)
object - an IObject instance.boolean removeModule(java.lang.String moduleName)
moduleName - a module name.
IModule getModule(java.lang.String moduleName)
moduleName - a module name.
IModule instance if such an instance could be found,
null otherwise.IObject getObject(java.lang.String name)
name - an object name, for example "sysDescr" or "SNMPv2-MIB.sysDescr".
IObject instance if such an instance could be found,
null otherwise.IObject getObject(IObjectID oid)
IObject with a given object ID.
oid - an IObjectID.
IObject instance if such an instance could be found,
null otherwise.IObject getObjectByOID(java.lang.String oid)
IObject with a given object ID string.
oid - an OID string with numerical subidentifiers.
IObject instance if such an instance could be found,
null otherwise.java.util.Enumeration modules()
modulesIterator() instead.
IModule instances.java.util.Iterator modulesIterator()
IModule instances.java.util.Enumeration getModulesSortedByName()
IModule instances.java.util.Vector getModuleNames()
Vector of module names of this MIB repository.
Vector of Strings.java.util.Enumeration objects()
Enumeration of all objects.
Enumeration of IObject instances.java.util.Enumeration objectsByName()
Enumeration of all objects ordered by name.
Enumeration of IObject instances.java.util.Iterator objectsOrderedByOccurance()
Iterator on the objects contained in this module
ordered by their occurance in the original (compiled) MIB module.
Iterator on the MIB objects of this module.void structureChanged()
java.lang.String getPath(IObjectID oid,
boolean withID)
oid - 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)".
java.lang.String getPath(java.lang.String oid,
boolean withID)
oid - 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)".java.util.Vector getNonOidObjects(boolean textualConventionsOnly)
textualConventionsOnly - if true only ITextualConvention instances are returned.
IObject instances.java.lang.String printModule(java.lang.String moduleName)
moduleName - a module name.
IObjectID makeObjectID(java.lang.String dottedString)
IObjectID from a dotted string or object name
path.
dottedString - 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.ITextualConvention getEffectiveSyntax(ISyntax syntax)
ISyntax. The effective syntax
is the base syntax with possibly additional range restrictions or
enumerations.
syntax - 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.java.util.Vector getObjectClassOID(java.lang.String oid)
oid - 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.IObjectType getObjectClass(java.lang.String oid)
null is returned.
See also getObjectClassOID(String oid).
oid - 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 | ||||||||