All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.sun.jaw.snmp.agent.SnmpMib

java.lang.Object
   |
   +----com.sun.jaw.snmp.agent.SnmpMib

public abstract class SnmpMib
extends Object
implements Serializable
The SnmpMib is an abstract class for representing a SNMP MIB. When compiling a SNMP MIB, among all the classes generated by mibgen, there is one which extends SnmpMib for representing a whole MIB.
The class is used by the SNMP adaptor as the entry point in the MIB.


Constructor Index

 o SnmpMib()
Default constructor.

Method Index

 o check(SnmpOid, SnmpValue)
Check if a set operation can be performed.
 o get(SnmpOid)
Get the value of the variable associated to the specified oid.
 o getBindingState()
Indicates whether or not the MIB module is binded to a Snmp adaptor.
 o getFramework()
Get reference on the JDMK framework in which the SNMP MIB is registered.
 o getMibName()
Get the mib name.
 o getNext(SnmpOid)
Get the next value of the variable following the specified oid.
 o getSnmpAdaptor()
Get reference on the SNMP adaptor through which the MIB is accessible.
 o getSnmpAdaptorName()
Return the logicial name of the adaptor to which the mib is binded.
 o init()
Initialization of the MIB (with no registration of the M-beans into JDMK).
 o initCmf(Framework, ObjectName)
Initialization of the MIB but each single M-bean representing the MIB is inserted into the framework.
 o set(SnmpOid, SnmpValue)
Set the variable identified by oid with the specified value.
 o setSnmpAdaptor(SnmpMibHandlerSrvIf)
Set the reference on the SNMP adaptor through which the MIB will be SNMP accessible.
 o setSnmpAdaptorName(String)
Set the reference on the SNMP adaptor through which the MIB will be SNMP accessible.

Constructors

 o SnmpMib
 public SnmpMib()
Default constructor. It initializes the oid tree.

Methods

 o init
 public abstract void init() throws IllegalAccessException
Initialization of the MIB (with no registration of the M-beans into JDMK).

Throws: IllegalAccessException
The MIB can not be initialized.
 o initCmf
 public abstract void initCmf(Framework cmf,
                              ObjectName name) throws IllegalAccessException, ServiceNotFoundException, InstanceAlreadyExistException
Initialization of the MIB but each single M-bean representing the MIB is inserted into the framework.

Throws: IllegalAccessException
The MIB can not be initialized.
Throws: InstanceAlreadyExistException
A m-bean is already registered in the repository.
Throws: ServiceNotFoundException
A requested service is not supported.
 o getFramework
 public Framework getFramework()
Get reference on the JDMK framework in which the SNMP MIB is registered.

Returns:
null if the mib is not registered in any framework.
 o getSnmpAdaptor
 public SnmpMibHandlerSrvIf getSnmpAdaptor()
Get reference on the SNMP adaptor through which the MIB is accessible.

 o setSnmpAdaptor
 public void setSnmpAdaptor(SnmpMibHandlerSrvIf stack)
Set the reference on the SNMP adaptor through which the MIB will be SNMP accessible.

 o setSnmpAdaptorName
 public void setSnmpAdaptorName(String name) throws InstanceNotFoundException, IllegalAccessException, ServiceNotFoundException
Set the reference on the SNMP adaptor through which the MIB will be SNMP accessible.

Throws: InstanceNotFoundException
The m-bean does not exist in the repository.
Throws: IllegalAccessException
The method has tried to access a class that is not public and in another package.
Throws: ServiceNotFoundException
The requested service is not supported.
 o getSnmpAdaptorName
 public String getSnmpAdaptorName()
Return the logicial name of the adaptor to which the mib is binded.

 o getBindingState
 public Boolean getBindingState()
Indicates whether or not the MIB module is binded to a Snmp adaptor. As a reminder, only binded mibs can be accessed through SNMP protocol.

 o get
 public SnmpValue get(SnmpOid oid) throws SnmpStatusException
Get the value of the variable associated to the specified oid.

Parameters:
oid - The oid of the variable to retrieve.
Returns:
The value corresponding to the MIB variable identified by oid
Throws: SnmpStatusException
An error occured during the operation.
 o getNext
 public SnmpVarBind getNext(SnmpOid oid) throws SnmpStatusException
Get the next value of the variable following the specified oid.

Parameters:
oid - The oid.
Returns:
The value of the next MIB variable rigth after oid.
Throws: SnmpStatusException
An error occured during the operation.
 o set
 public SnmpValue set(SnmpOid oid,
                      SnmpValue value) throws SnmpStatusException
Set the variable identified by oid with the specified value.

Parameters:
oid - The oid of the MIB variable to be set.
value - The value.
Returns:
The new value
Throws: SnmpStatusException
An error occured during the operation.
 o check
 public void check(SnmpOid oid,
                   SnmpValue value) throws SnmpStatusException
Check if a set operation can be performed. If the operation can not be performed, the method should emit a SnmpStatusException.

Parameters:
oid - The oid of the MIB variable to be set.
value - The value.
Throws: SnmpStatusException
The operation can not be performed.
 o getMibName
 public String getMibName()
Get the mib name.


All Packages  Class Hierarchy  This Package  Previous  Next  Index