com.sun.management.snmp.agent
Interface SnmpMibAgentMBean

All Known Implementing Classes:
SNMP_USER_BASED_SM_MIB, SNMP_USER_BASED_SM_MIBImpl, SnmpErrorHandlerAgent, SnmpMib, SnmpMibAgent, SnmpProxy, SnmpUsmProxy, SnmpV3Proxy

public interface SnmpMibAgentMBean

Exposes the remote management interface of the SnmpMibAgent MBean.

Since:
Java DMK 5.1

Method Summary
 void check(SnmpMibRequest req)
          Checks if a set operation can be performed.
 void get(SnmpMibRequest req)
          Processes a get operation.
 boolean getBindingState()
          Indicates whether or not the MIB module is bound to a SNMP protocol adaptor.
 void getBulk(SnmpMibRequest req, int nonRepeat, int maxRepeat)
          Processes a getBulk operation.
 MBeanServer getMBeanServer()
          Gets the reference to the MBean server in which the SNMP MIB is registered.
 String getMibName()
          Gets the MIB name.
 void getNext(SnmpMibRequest req)
          Processes a getNext operation.
 SnmpMibHandler getSnmpAdaptor()
          Gets the reference to the SNMP protocol adaptor to which the MIB is bound.
 ObjectName getSnmpAdaptorName()
          Gets the object name of the SNMP protocol adaptor to which the MIB is bound.
 void set(SnmpMibRequest req)
          Processes a set operation.
 void setSnmpAdaptor(SnmpMibHandler stack)
          Sets the reference to the SNMP protocol adaptor through which the MIB will be SNMP accessible and add this new MIB in the SNMP MIB handler.
 void setSnmpAdaptor(SnmpMibHandler stack, SnmpOid[] oids)
          Sets the reference to the SNMP protocol adaptor through which the MIB will be SNMP accessible and add this new MIB in the SNMP MIB handler.
 void setSnmpAdaptor(SnmpMibHandler stack, String contextName)
          Sets the reference to the SNMP protocol adaptor through which the MIB will be SNMP accessible and add this new MIB in the SNMP MIB handler.
 void setSnmpAdaptor(SnmpMibHandler stack, String contextName, SnmpOid[] oids)
          Sets the reference to the SNMP protocol adaptor through which the MIB will be SNMP accessible and adds this new MIB in the SNMP MIB handler.
 void setSnmpAdaptorName(ObjectName name)
          Sets the reference to the SNMP protocol adaptor through which the MIB will be SNMP accessible and add this new MIB in the SNMP MIB handler associated to the specified name.
 void setSnmpAdaptorName(ObjectName name, SnmpOid[] oids)
          Sets the reference to the SNMP protocol adaptor through which the MIB will be SNMP accessible and add this new MIB in the SNMP MIB handler associated to the specified name.
 void setSnmpAdaptorName(ObjectName name, String contextName)
          Sets the reference to the SNMP protocol adaptor through which the MIB will be SNMP accessible and add this new MIB in the SNMP MIB handler associated to the specified name.
 void setSnmpAdaptorName(ObjectName name, String contextName, SnmpOid[] oids)
          Sets the reference to the SNMP protocol adaptor through which the MIB will be SNMP accessible and add this new MIB in the SNMP MIB handler associated to the specified name.
 

Method Detail

get

void get(SnmpMibRequest req)
         throws SnmpStatusException
Processes a get operation. This method must not be called from remote.

Parameters:
req - The SnmpMibRequest object holding the list of variables to be retrieved. This list is composed of SnmpVarBind objects.
Throws:
SnmpStatusException - An error occurred during the operation.
See Also:
SnmpMibAgent.get(SnmpMibRequest)

getNext

void getNext(SnmpMibRequest req)
             throws SnmpStatusException
Processes a getNext operation. This method must not be called from remote.

Parameters:
req - The SnmpMibRequest object holding the list of variables to be retrieved. This list is composed of SnmpVarBind objects.
Throws:
SnmpStatusException - An error occurred during the operation.
See Also:
SnmpMibAgent.getNext(SnmpMibRequest)

getBulk

void getBulk(SnmpMibRequest req,
             int nonRepeat,
             int maxRepeat)
             throws SnmpStatusException
Processes a getBulk operation. This method must not be called from remote.

Parameters:
req - The SnmpMibRequest object holding the list of variables to be retrieved. This list is composed of SnmpVarBind objects.
nonRepeat - The number of variables, starting with the first variable in the variable-bindings, for which a single lexicographic successor is requested.
maxRepeat - The number of lexicographic successors requested for each of the last R variables. R is the number of variables following the first nonRepeat variables for which multiple lexicographic successors are requested.
Throws:
SnmpStatusException - An error occurred during the operation.
See Also:
SnmpMibAgent.getBulk(SnmpMibRequest,int,int)

set

void set(SnmpMibRequest req)
         throws SnmpStatusException
Processes a set operation. This method must not be called from remote.

Parameters:
req - The SnmpMibRequest object holding the list of variables to be set. This list is composed of SnmpVarBind objects.
Throws:
SnmpStatusException - An error occurred during the operation.
See Also:
SnmpMibAgent.set(SnmpMibRequest)

check

void check(SnmpMibRequest req)
           throws SnmpStatusException
Checks if a set operation can be performed. If the operation cannot be performed, the method should emit a SnmpStatusException.

Parameters:
req - The SnmpMibRequest object holding the list of variables to be set. This list is composed of SnmpVarBind objects.
Throws:
SnmpStatusException - The set operation cannot be performed.
See Also:
SnmpMibAgent.check(SnmpMibRequest)

getMBeanServer

MBeanServer getMBeanServer()
Gets the reference to the MBean server in which the SNMP MIB is registered.

Returns:
The MBean server or null if the MIB is not registered in any MBean server.

getSnmpAdaptor

SnmpMibHandler getSnmpAdaptor()
Gets the reference to the SNMP protocol adaptor to which the MIB is bound.
This method is used for accessing the SNMP MIB handler property of the SNMP MIB agent in case of a standalone agent.

Returns:
The SNMP MIB handler.

setSnmpAdaptor

void setSnmpAdaptor(SnmpMibHandler stack)
Sets the reference to the SNMP protocol adaptor through which the MIB will be SNMP accessible and add this new MIB in the SNMP MIB handler.
This method is used for setting the SNMP MIB handler property of the SNMP MIB agent in case of a standalone agent.

Parameters:
stack - The SNMP MIB handler.

setSnmpAdaptor

void setSnmpAdaptor(SnmpMibHandler stack,
                    SnmpOid[] oids)
Sets the reference to the SNMP protocol adaptor through which the MIB will be SNMP accessible and add this new MIB in the SNMP MIB handler. This method is to be called to set a specific agent to a specific OID. This can be useful when dealing with MIB overlapping. Some OID can be implemented in more than one MIB. In this case, the OID nearer agent will be used on SNMP operations.

Parameters:
stack - The SNMP MIB handler.
oids - The set of OIDs this agent implements.

setSnmpAdaptor

void setSnmpAdaptor(SnmpMibHandler stack,
                    String contextName)
Sets the reference to the SNMP protocol adaptor through which the MIB will be SNMP accessible and add this new MIB in the SNMP MIB handler. Adds a new contextualized MIB in the SNMP MIB handler.

Parameters:
stack - The SNMP MIB handler.
contextName - The MIB context name. If null is passed, will be registered in the default context.
Throws:
IllegalArgumentException - If the parameter is null.

setSnmpAdaptor

void setSnmpAdaptor(SnmpMibHandler stack,
                    String contextName,
                    SnmpOid[] oids)
Sets the reference to the SNMP protocol adaptor through which the MIB will be SNMP accessible and adds this new MIB in the SNMP MIB handler. Adds a new contextualized MIB in the SNMP MIB handler.

Parameters:
stack - The SNMP MIB handler.
contextName - The MIB context name. If null is passed, will be registered in the default context.
oids - The set of OIDs this agent implements.
Throws:
IllegalArgumentException - If the parameter is null.

getSnmpAdaptorName

ObjectName getSnmpAdaptorName()
Gets the object name of the SNMP protocol adaptor to which the MIB is bound.

Returns:
The name of the SNMP protocol adaptor.

setSnmpAdaptorName

void setSnmpAdaptorName(ObjectName name)
                        throws InstanceNotFoundException,
                               ServiceNotFoundException
Sets the reference to the SNMP protocol adaptor through which the MIB will be SNMP accessible and add this new MIB in the SNMP MIB handler associated to the specified name.

Parameters:
name - The object name of the SNMP MIB handler.
Throws:
InstanceNotFoundException - The MBean does not exist in the MBean server.
ServiceNotFoundException - This SNMP MIB is not registered in the MBean server or the requested service is not supported.

setSnmpAdaptorName

void setSnmpAdaptorName(ObjectName name,
                        SnmpOid[] oids)
                        throws InstanceNotFoundException,
                               ServiceNotFoundException
Sets the reference to the SNMP protocol adaptor through which the MIB will be SNMP accessible and add this new MIB in the SNMP MIB handler associated to the specified name. This method is to be called to set a specific agent to a specific OID. This can be useful when dealing with MIB overlapping. Some OID can be implemented in more than one MIB. In this case, the OID nearer agent will be used on SNMP operations.

Parameters:
name - The name of the SNMP protocol adaptor.
oids - The set of OIDs this agent implements.
Throws:
InstanceNotFoundException - The SNMP protocol adaptor does not exist in the MBean server.
ServiceNotFoundException - This SNMP MIB is not registered in the MBean server or the requested service is not supported.

setSnmpAdaptorName

void setSnmpAdaptorName(ObjectName name,
                        String contextName)
                        throws InstanceNotFoundException,
                               ServiceNotFoundException
Sets the reference to the SNMP protocol adaptor through which the MIB will be SNMP accessible and add this new MIB in the SNMP MIB handler associated to the specified name.

Parameters:
name - The name of the SNMP protocol adaptor.
contextName - The MIB context name. If null is passed, will be registered in the default context.
Throws:
InstanceNotFoundException - The SNMP protocol adaptor does not exist in the MBean server.
ServiceNotFoundException - This SNMP MIB is not registered in the MBean server or the requested service is not supported.

setSnmpAdaptorName

void setSnmpAdaptorName(ObjectName name,
                        String contextName,
                        SnmpOid[] oids)
                        throws InstanceNotFoundException,
                               ServiceNotFoundException
Sets the reference to the SNMP protocol adaptor through which the MIB will be SNMP accessible and add this new MIB in the SNMP MIB handler associated to the specified name.

Parameters:
name - The name of the SNMP protocol adaptor.
contextName - The MIB context name. If null is passed, will be registered in the default context.
oids - The set of OIDs this agent implements.
Throws:
InstanceNotFoundException - The SNMP protocol adaptor does not exist in the MBean server.
ServiceNotFoundException - This SNMP MIB is not registered in the MBean server or the requested service is not supported.

getBindingState

boolean getBindingState()
Indicates whether or not the MIB module is bound to a SNMP protocol adaptor. As a reminder, only bound MIBs can be accessed through SNMP protocol adaptor.

Returns:
true if the MIB module is bound, false otherwise.

getMibName

String getMibName()
Gets the MIB name.

Returns:
The MIB name.

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.