com.sun.management.snmp.agent
Interface SnmpMibHandler

All Known Implementing Classes:
SnmpAdaptorServer, SnmpV3AdaptorServer

public interface SnmpMibHandler

The logical link between an SNMP MIB and the SNMP communication stack. This interface is for INTERNAL USE ONLY, don't use it.

Since:
Java DMK 5.1

Method Summary
 SnmpMibHandler addMib(SnmpMibAgent mib)
          Adds a new MIB in the SNMP MIB handler.
 SnmpMibHandler addMib(SnmpMibAgent mib, SnmpOid[] oids)
          Adds a new MIB in the SNMP MIB handler.
 SnmpMibHandler addMib(SnmpMibAgent mib, String contextName)
          Adds a new contextualized MIB in the SNMP MIB handler.
 SnmpMibHandler addMib(SnmpMibAgent mib, String contextName, SnmpOid[] oids)
          Adds a new contextualized MIB in the SNMP MIB handler.
 boolean removeMib(SnmpMibAgent mib)
          Removes the specified MIB from the SNMP protocol adaptor.
 boolean removeMib(SnmpMibAgent mib, SnmpOid[] oids)
          Removes the specified MIB from the SNMP protocol adaptor.
 boolean removeMib(SnmpMibAgent mib, String contextName)
          Removes the specified MIB from the SNMP protocol adaptor.
 boolean removeMib(SnmpMibAgent mib, String contextName, SnmpOid[] oids)
          Removes the specified MIB from the SNMP protocol adaptor.
 

Method Detail

addMib

SnmpMibHandler addMib(SnmpMibAgent mib)
                      throws IllegalArgumentException
Adds a new MIB in the SNMP MIB handler. This method is called automatically by SnmpMibAgent.setSnmpAdaptor(SnmpMibHandler) and SnmpMibAgent.setSnmpAdaptorName(ObjectName) and should not be called directly.

Parameters:
mib - The MIB to add.
Returns:
A reference on the SNMP MIB handler.
Throws:
IllegalArgumentException - If the parameter is null.

addMib

SnmpMibHandler addMib(SnmpMibAgent mib,
                      SnmpOid[] oids)
                      throws IllegalArgumentException
Adds a new MIB in the SNMP MIB handler. This method is called automatically by SnmpMibAgent.setSnmpAdaptor(SnmpMibHandler, SnmpOid[]) and SnmpMibAgent.setSnmpAdaptorName(ObjectName, SnmpOid[]) and should not be called directly.

Parameters:
mib - The MIB to add.
oids - The array of oid used to add the mib. Each oid is a root oid for the mib.
Returns:
A reference on the SNMP MIB handler.
Throws:
IllegalArgumentException - If the parameter is null.

addMib

SnmpMibHandler addMib(SnmpMibAgent mib,
                      String contextName)
                      throws IllegalArgumentException
Adds a new contextualized MIB in the SNMP MIB handler. This method is called automatically by SnmpMibAgent.setSnmpAdaptor(SnmpMibHandler, String) and SnmpMibAgent.setSnmpAdaptorName(ObjectName, String) and should not be called directly.

Parameters:
mib - The MIB to add.
contextName - The MIB context name. If null is passed, will be registered in the default context.
Returns:
A reference to the SNMP MIB handler.
Throws:
IllegalArgumentException - If the parameter is null.

addMib

SnmpMibHandler addMib(SnmpMibAgent mib,
                      String contextName,
                      SnmpOid[] oids)
                      throws IllegalArgumentException
Adds a new contextualized MIB in the SNMP MIB handler. This method is called automatically by SnmpMibAgent.setSnmpAdaptor(SnmpMibHandler, String, SnmpOid[]) and SnmpMibAgent.setSnmpAdaptorName(ObjectName, String, SnmpOid[]) and should not be called directly.

Parameters:
mib - The MIB to add.
contextName - The MIB context name. If null is passed, will be registered in the default context.
oids - The array of oid used to add the mib. Each oid is a root oid for the mib.
Returns:
A reference to the SNMP MIB handler.
Throws:
IllegalArgumentException - If the parameter is null.

removeMib

boolean removeMib(SnmpMibAgent mib)
Removes the specified MIB from the SNMP protocol adaptor. This method is called automatically by SnmpMibAgent.setSnmpAdaptor(SnmpMibHandler) and SnmpMibAgent.setSnmpAdaptorName(ObjectName) and should not be called directly.

Parameters:
mib - The MIB to be removed.
Returns:
true if the specified mib was a MIB included in the SNMP MIB handler, false otherwise.

removeMib

boolean removeMib(SnmpMibAgent mib,
                  SnmpOid[] oids)
Removes the specified MIB from the SNMP protocol adaptor. This method is called automatically by SnmpMibAgent.setSnmpAdaptor(SnmpMibHandler) and SnmpMibAgent.setSnmpAdaptorName(ObjectName) and should not be called directly.

Parameters:
mib - The MIB to be removed.
oids - The oid the MIB was previously registered for.
Returns:
true if the specified mib was a MIB included in the SNMP MIB handler, false otherwise.

removeMib

boolean removeMib(SnmpMibAgent mib,
                  String contextName)
Removes the specified MIB from the SNMP protocol adaptor. This method is called automatically by SnmpMibAgent.setSnmpAdaptor(SnmpMibHandler, String) and SnmpMibAgent.setSnmpAdaptorName(ObjectName, String) and should not be called directly.

Parameters:
mib - The MIB to be removed.
contextName - The context name used at registration time.
Returns:
true if the specified mib was a MIB included in the SNMP MIB handler, false otherwise.

removeMib

boolean removeMib(SnmpMibAgent mib,
                  String contextName,
                  SnmpOid[] oids)
Removes the specified MIB from the SNMP protocol adaptor. This method is called automatically by SnmpMibAgent.setSnmpAdaptor(SnmpMibHandler, String, SnmpOid[]) and SnmpMibAgent.setSnmpAdaptorName(ObjectName, String, SnmpOid[]) and should not be called directly.

Parameters:
mib - The MIB to be removed.
contextName - The context name used at registration time.
oids - The oid the MIB was previously registered for.
Returns:
true if the specified mib was a MIB included in the SNMP MIB handler, false otherwise.

Open Source build 02
opendmk-1.0-b02 2007.10.01_19:17:46_MEST

Copyright 1998-2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.