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.
-
SnmpMib()
- Default constructor.
-
check(SnmpOid, SnmpValue)
- Check if a set operation can be performed.
-
get(SnmpOid)
- Get the value of the variable associated to the specified oid.
-
getBindingState()
- Indicates whether or not the MIB module is binded to a Snmp adaptor.
-
getFramework()
- Get reference on the JDMK framework in which the SNMP MIB is registered.
-
getMibName()
- Get the mib name.
-
getNext(SnmpOid)
- Get the next value of the variable following the specified oid.
-
getSnmpAdaptor()
- Get reference on the SNMP adaptor through which the MIB is accessible.
-
getSnmpAdaptorName()
- Return the logicial name of the adaptor to which the mib is binded.
-
init()
- Initialization of the MIB (with no registration of the M-beans into JDMK).
-
initCmf(Framework, ObjectName)
- Initialization of the MIB but each single M-bean representing the MIB is inserted into the
framework.
-
set(SnmpOid, SnmpValue)
- Set the variable identified by oid with the specified value.
-
setSnmpAdaptor(SnmpMibHandlerSrvIf)
- Set the reference on the SNMP adaptor through which the MIB will be
SNMP accessible.
-
setSnmpAdaptorName(String)
- Set the reference on the SNMP adaptor through which the MIB will be
SNMP accessible.
SnmpMib
public SnmpMib()
- Default constructor.
It initializes the oid tree.
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.
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.
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.
getSnmpAdaptor
public SnmpMibHandlerSrvIf getSnmpAdaptor()
- Get reference on the SNMP adaptor through which the MIB is accessible.
setSnmpAdaptor
public void setSnmpAdaptor(SnmpMibHandlerSrvIf stack)
- Set the reference on the SNMP adaptor through which the MIB will be
SNMP accessible.
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.
getSnmpAdaptorName
public String getSnmpAdaptorName()
- Return the logicial name of the adaptor to which the mib is binded.
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.
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.
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.
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.
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.
getMibName
public String getMibName()
- Get the mib name.
All Packages Class Hierarchy This Package Previous Next Index