JASMI API

com.agentpp.smi.event
Interface RepositoryListener

All Superinterfaces:
java.util.EventListener
All Known Implementing Classes:
DumpObjectTypes, SMIRepositoryManager

public interface RepositoryListener
extends java.util.EventListener

The RepositoryListener interface is implemented by classes that provide input and output streams to read and write MIB modules from/to persistent storage. By default JASMI is using a dedicated directory to store compiled MIB modules. By implementing this interface and adding the listener to the SMIRepository instance, one can change the default behavior to use customer provided input and output streams.

Version:
1.0
Author:
Frank Fock

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.
 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.
 

Method Detail

writeModule

void writeModule(RepositoryEvent event)
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.

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.

readModule

void readModule(RepositoryEvent event)
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.

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.

deleteModule

void deleteModule(RepositoryEvent event)
Requests deletion of the MIB module identified by the module name supplied with the RepositoryEvent object.

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.

listModuleNames

java.lang.String[] listModuleNames()
Enumerates the available MIB module names in the repository.

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