JASMI API

com.agentpp.smi.examples
Class DumpObjectTypes

java.lang.Object
  extended by com.agentpp.smi.examples.DumpObjectTypes
All Implemented Interfaces:
RepositoryListener, java.util.EventListener

public class DumpObjectTypes
extends java.lang.Object
implements RepositoryListener

This example shows how MIB module information from a MIB repository can be accessed. A MIB repository can be either a directory (default) or a ZIP/JAR file. This example shows also how custom MIB repository IO can be used to load MIB modules from ZIP or JAR files. Writing compiled MIB modules to ZIP and JAR files would also be possible but is not shown here.

Version:
3.0
Author:
Frank Fock

Constructor Summary
DumpObjectTypes(java.lang.String license, java.lang.String licenseKey, java.lang.String repositoryPath, java.lang.String moduleName)
           
 
Method Summary
 void deleteModule(RepositoryEvent event)
          Requests deletion of the MIB module identified by the module name supplied with the RepositoryEvent object.
 java.lang.String[] listModuleNames()
          Enumerates the available MIB module names in the repository.
static void main(java.lang.String[] args)
           
 void readModule(RepositoryEvent event)
          Requests to read a MIB module with the name specified in the supplied event object.
 void writeModule(RepositoryEvent event)
          Requests to write a MIB module with the name specified in the supplied event object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DumpObjectTypes

public DumpObjectTypes(java.lang.String license,
                       java.lang.String licenseKey,
                       java.lang.String repositoryPath,
                       java.lang.String moduleName)
Method Detail

main

public static void main(java.lang.String[] args)

writeModule

public void writeModule(RepositoryEvent event)
Description copied from interface: RepositoryListener
Requests to write a MIB module with the name specified in the supplied event object. Implementors of this method should set the OutputStream member of the supplied event object.

Specified by:
writeModule in interface RepositoryListener
Parameters:
event - a RepositoryEvent with the module name of the MIB module that should be written to persistent storage. The implementor of this interface should set the OutputStream of event.

deleteModule

public void deleteModule(RepositoryEvent event)
Description copied from interface: RepositoryListener
Requests deletion of the MIB module identified by the module name supplied with the RepositoryEvent object.

Specified by:
deleteModule in interface RepositoryListener
Parameters:
event - a RepositoryEvent with the module name of the MIB module that should be removed from persistent MIB repository storage. If a listener has successfully removed the module, it must set the corresponding flag in the supplied event object.

readModule

public void readModule(RepositoryEvent event)
Description copied from interface: RepositoryListener
Requests to read a MIB module with the name specified in the supplied event object. Implementors of this method should set the InputStream member of the supplied event object.

Specified by:
readModule in interface RepositoryListener
Parameters:
event - a RepositoryEvent with the module name of the MIB module that should be read from persistent storage. The implementor of this interface should set the InputStream of event.

listModuleNames

public java.lang.String[] listModuleNames()
Description copied from interface: RepositoryListener
Enumerates the available MIB module names in the repository.

Specified by:
listModuleNames in interface RepositoryListener
Returns:
a list of MIB module names or null if that method is not supported by the listener.

JASMI API

JASMI 3
Copyright 2001-2010 Frank Fock
All Rights Reserved