com.sun.management.snmp.usm.usmmib
Class SNMP_USER_BASED_SM_MIB

java.lang.Object
  extended by com.sun.management.snmp.agent.SnmpMibAgent
      extended by com.sun.management.snmp.agent.SnmpMib
          extended by com.sun.management.snmp.usm.usmmib.SNMP_USER_BASED_SM_MIB
All Implemented Interfaces:
SnmpMibAgentMBean, Serializable, MBeanRegistration
Direct Known Subclasses:
SNMP_USER_BASED_SM_MIBImpl

public class SNMP_USER_BASED_SM_MIB
extends SnmpMib
implements Serializable

The class is used for representing "SNMP-USER-BASED-SM-MIB". You can edit the file if you want to modify the behavior of the MIB.

Since:
Java DMK 5.1
See Also:
Serialized Form

Field Summary
protected  Hashtable metadatas
           
protected  SnmpStandardObjectServer objectserver
           
 
Fields inherited from class com.sun.management.snmp.agent.SnmpMib
root
 
Fields inherited from class com.sun.management.snmp.agent.SnmpMibAgent
mibName, server
 
Constructor Summary
SNMP_USER_BASED_SM_MIB()
          Default constructor.
 
Method Summary
protected  Object createUsmStatsMBean(String groupName, String groupOid, ObjectName groupObjname, MBeanServer server)
          Factory method for "UsmStats" group MBean.
protected  UsmStatsMeta createUsmStatsMetaNode(String groupName, String groupOid, ObjectName groupObjname, MBeanServer server)
          Factory method for "UsmStats" group metadata class.
protected  Object createUsmUserMBean(String groupName, String groupOid, ObjectName groupObjname, MBeanServer server)
          Factory method for "UsmUser" group MBean.
protected  UsmUserMeta createUsmUserMetaNode(String groupName, String groupOid, ObjectName groupObjname, MBeanServer server)
          Factory method for "UsmUser" group metadata class.
 SnmpMibTable getRegisteredTableMeta(String name)
          Returns a registered SNMP Table metadata node.
 SnmpStandardObjectServer getStandardObjectServer()
           
 void init()
          Initialization of the MIB with no registration in Java DMK.
protected  void initUsmStats(MBeanServer server)
          Initialization of the "UsmStats" group.
protected  void initUsmUser(MBeanServer server)
          Initialization of the "UsmUser" group.
 void populate(MBeanServer server, ObjectName name)
          Initialization of the MIB with no registration in Java DMK.
 ObjectName preRegister(MBeanServer server, ObjectName name)
          Initialization of the MIB with AUTOMATIC REGISTRATION in Java DMK.
 void registerTableMeta(String name, SnmpMibTable meta)
           Register an SNMP Table metadata node in the MIB.
 
Methods inherited from class com.sun.management.snmp.agent.SnmpMib
check, get, getBulk, getGroupObjectName, getGroupOid, getNext, getRootOid, registerGroupNode, set
 
Methods inherited from class com.sun.management.snmp.agent.SnmpMibAgent
getBindingState, getMBeanServer, getMibName, getSnmpAdaptor, getSnmpAdaptorName, newMibRequest, newMibRequest, postDeregister, postRegister, preDeregister, setSnmpAdaptor, setSnmpAdaptor, setSnmpAdaptor, setSnmpAdaptor, setSnmpAdaptorName, setSnmpAdaptorName, setSnmpAdaptorName, setSnmpAdaptorName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

objectserver

protected SnmpStandardObjectServer objectserver

metadatas

protected final Hashtable metadatas
Constructor Detail

SNMP_USER_BASED_SM_MIB

public SNMP_USER_BASED_SM_MIB()
Default constructor. Initialize the Mib tree.

Method Detail

init

public void init()
          throws IllegalAccessException
Initialization of the MIB with no registration in Java DMK.

Specified by:
init in class SnmpMibAgent
Throws:
IllegalAccessException - The MIB can not be initialized.

preRegister

public ObjectName preRegister(MBeanServer server,
                              ObjectName name)
                       throws Exception
Initialization of the MIB with AUTOMATIC REGISTRATION in Java DMK.

Specified by:
preRegister in interface MBeanRegistration
Specified by:
preRegister in class SnmpMibAgent
Parameters:
server - The MBean server to register the service with.
name - The object name.
Returns:
The name of the SNMP MIB registered.
Throws:
Exception

populate

public void populate(MBeanServer server,
                     ObjectName name)
              throws Exception
Initialization of the MIB with no registration in Java DMK.

Throws:
Exception

initUsmUser

protected void initUsmUser(MBeanServer server)
                    throws Exception
Initialization of the "UsmUser" group. To disable support of this group, redefine the "createUsmUserMetaNode()" factory method, and make it return "null"

Parameters:
server - MBeanServer for this group (may be null)
Throws:
Exception

createUsmUserMetaNode

protected UsmUserMeta createUsmUserMetaNode(String groupName,
                                            String groupOid,
                                            ObjectName groupObjname,
                                            MBeanServer server)
Factory method for "UsmUser" group metadata class. You can redefine this method if you need to replace the default generated metadata class with your own customized class.

Parameters:
groupName - Name of the group ("UsmUser")
groupOid - OID of this group
groupObjname - ObjectName for this group (may be null)
server - MBeanServer for this group (may be null)
Returns:
An instance of the metadata class generated for the "UsmUser" group (UsmUserMeta)

createUsmUserMBean

protected Object createUsmUserMBean(String groupName,
                                    String groupOid,
                                    ObjectName groupObjname,
                                    MBeanServer server)
Factory method for "UsmUser" group MBean. You can redefine this method if you need to replace the default generated MBean class with your own customized class.

Parameters:
groupName - Name of the group ("UsmUser")
groupOid - OID of this group
groupObjname - ObjectName for this group (may be null)
server - MBeanServer for this group (may be null)
Returns:
An instance of the MBean class generated for the "UsmUser" group (UsmUser) Note that when using standard metadata, the returned object must implement the "UsmUserMBean" interface.

initUsmStats

protected void initUsmStats(MBeanServer server)
                     throws Exception
Initialization of the "UsmStats" group. To disable support of this group, redefine the "createUsmStatsMetaNode()" factory method, and make it return "null"

Parameters:
server - MBeanServer for this group (may be null)
Throws:
Exception

createUsmStatsMetaNode

protected UsmStatsMeta createUsmStatsMetaNode(String groupName,
                                              String groupOid,
                                              ObjectName groupObjname,
                                              MBeanServer server)
Factory method for "UsmStats" group metadata class. You can redefine this method if you need to replace the default generated metadata class with your own customized class.

Parameters:
groupName - Name of the group ("UsmStats")
groupOid - OID of this group
groupObjname - ObjectName for this group (may be null)
server - MBeanServer for this group (may be null)
Returns:
An instance of the metadata class generated for the "UsmStats" group (UsmStatsMeta)

createUsmStatsMBean

protected Object createUsmStatsMBean(String groupName,
                                     String groupOid,
                                     ObjectName groupObjname,
                                     MBeanServer server)
Factory method for "UsmStats" group MBean. You can redefine this method if you need to replace the default generated MBean class with your own customized class.

Parameters:
groupName - Name of the group ("UsmStats")
groupOid - OID of this group
groupObjname - ObjectName for this group (may be null)
server - MBeanServer for this group (may be null)
Returns:
An instance of the MBean class generated for the "UsmStats" group (UsmStats) Note that when using standard metadata, the returned object must implement the "UsmStatsMBean" interface.

registerTableMeta

public void registerTableMeta(String name,
                              SnmpMibTable meta)
Description copied from class: SnmpMib

Register an SNMP Table metadata node in the MIB.

This method is used internally and you should never need to call it directly.
It is used to establish the link between an SNMP table metadata node and its bean-like counterpart.
The group metadata nodes will create and register their underlying table metadata nodes in the MIB using this method.
The metadata nodes will be later retrieved from the MIB by the bean-like table objects using the getRegisterTableMeta() method.

Specified by:
registerTableMeta in class SnmpMib
Parameters:
name - The java-ized name of the SNMP table.
meta - The SNMP table metadata node - usually this corresponds to a mibgen generated object.

getRegisteredTableMeta

public SnmpMibTable getRegisteredTableMeta(String name)
Description copied from class: SnmpMib
Returns a registered SNMP Table metadata node.

This method is used internally and you should never need to call it directly.

Specified by:
getRegisteredTableMeta in class SnmpMib

getStandardObjectServer

public SnmpStandardObjectServer getStandardObjectServer()

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.