com.adventnet.adaptors.snmp
Class SnmpGroup

java.lang.Object
  extended by com.adventnet.adaptors.snmp.SnmpGroup
All Implemented Interfaces:
javax.management.DynamicMBean

public class SnmpGroup
extends java.lang.Object
implements javax.management.DynamicMBean

This class acts as a mbean for the Snmp group counter values as specified in the RFC-1213 mib for the snmp agent. By default this gets instantiated and registered with the MBeanServer when the SnmpAdaptor gets registered with the server. Thus providing the snmp group instrumentation for the snmp agent. It gets registered with the server with the ObjectName as

  • SNMP:group=snmp,mib=RFC-1213,type=com.adventnet.adaptors.snmp.SnmpGroup

    See Also:
    SnmpGroup

    Constructor Summary
    SnmpGroup()
              The NoArg constructor
    SnmpGroup(PropertyRegistrationListener prl, SnmpAdaptor adaptor)
              The constructor which takes PropertyRegistrationListener as argument.
     
    Method Summary
     java.lang.Object getAttribute(java.lang.String attribute)
              Gets the value of a specific attribute of this MBean.
     javax.management.AttributeList getAttributes(java.lang.String[] attributes)
              Enables the values of several attributes of this MBean.
     javax.management.MBeanInfo getMBeanInfo()
              This method discovers the attributes and operations this MBean exposes for management.
     java.lang.Integer getSnmpEnableAuthenTraps()
              Handles the SNMP Get Request for snmpEnableAuthenTraps
     java.lang.Long getSnmpInASNParseErrs()
              Handles the SNMP Get Request for snmpInASNParseErrs
     java.lang.Long getSnmpInBadCommunityNames()
              Handles the SNMP Get Request for snmpInBadCommunityNames
     java.lang.Long getSnmpInBadCommunityUses()
              Handles the SNMP Get Request for snmpInBadCommunityUses
     java.lang.Long getSnmpInBadValues()
              Handles the SNMP Get Request for snmpInBadValues
     java.lang.Long getSnmpInBadVersions()
              Handles the SNMP Get Request for snmpInBadVersions
     java.lang.Long getSnmpInGenErrs()
              Handles the SNMP Get Request for snmpInGenErrs
     java.lang.Long getSnmpInGetNexts()
              Handles the SNMP Get Request for snmpInGetNexts
     java.lang.Long getSnmpInGetRequests()
              Handles the SNMP Get Request for snmpInGetRequests
     java.lang.Long getSnmpInGetResponses()
              Handles the SNMP Get Request for snmpInGetResponses
     java.lang.Long getSnmpInNoSuchNames()
              Handles the SNMP Get Request for snmpInNoSuchNames
     java.lang.Long getSnmpInPkts()
              Handles the SNMP Get Request for snmpInPkts
     java.lang.Long getSnmpInReadOnlys()
              Handles the SNMP Get Request for snmpInReadOnlys
     java.lang.Long getSnmpInSetRequests()
              Handles the SNMP Get Request for snmpInSetRequests
     java.lang.Long getSnmpInTooBigs()
              Handles the SNMP Get Request for snmpInTooBigs
     java.lang.Long getSnmpInTotalReqVars()
              Handles the SNMP Get Request for snmpInTotalReqVars
     java.lang.Long getSnmpInTotalSetVars()
              Handles the SNMP Get Request for snmpInTotalSetVars
     java.lang.Long getSnmpInTraps()
              Handles the SNMP Get Request for snmpInTraps
     java.lang.Long getSnmpOutBadValues()
              Handles the SNMP Get Request for snmpOutBadValues
     java.lang.Long getSnmpOutGenErrs()
              Handles the SNMP Get Request for snmpOutGenErrs
     java.lang.Long getSnmpOutGetNexts()
              Handles the SNMP Get Request for snmpOutGetNexts
     java.lang.Long getSnmpOutGetRequests()
              Handles the SNMP Get Request for snmpOutGetRequests
     java.lang.Long getSnmpOutGetResponses()
              Handles the SNMP Get Request for snmpOutGetResponses
     java.lang.Long getSnmpOutNoSuchNames()
              Handles the SNMP Get Request for snmpOutNoSuchNames
     java.lang.Long getSnmpOutPkts()
              Handles the SNMP Get Request for snmpOutPkts
     java.lang.Long getSnmpOutSetRequests()
              Handles the SNMP Get Request for snmpOutSetRequests
     java.lang.Long getSnmpOutTooBigs()
              Handles the SNMP Get Request for snmpOutTooBigs
     java.lang.Long getSnmpOutTraps()
              Handles the SNMP Get Request for snmpOutTraps
     java.lang.Object invoke(java.lang.String actionName, java.lang.Object[] params, java.lang.String[] signature)
              Invokes an action on this MBean.
     void setAttribute(javax.management.Attribute attribute)
              Sets the value of a specific attribute of this MBean.
     javax.management.AttributeList setAttributes(javax.management.AttributeList attributes)
              Sets the values of several attributes of this MBean.
    (package private)  void setPropertyRegistrationListener(PropertyRegistrationListener prl)
               
     void setSnmpEnableAuthenTraps(java.lang.Integer val)
              Handles the SNMP Set Request for snmpEnableAuthenTraps
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
     

    Constructor Detail

    SnmpGroup

    public SnmpGroup()
    The NoArg constructor


    SnmpGroup

    public SnmpGroup(PropertyRegistrationListener prl,
                     SnmpAdaptor adaptor)
    The constructor which takes PropertyRegistrationListener as argument.

    Parameters:
    prl - The PropertyRegistrationListener for this Group
    adaptor - The SnmpAdaptor for this group
    Method Detail

    setPropertyRegistrationListener

    void setPropertyRegistrationListener(PropertyRegistrationListener prl)

    getMBeanInfo

    public javax.management.MBeanInfo getMBeanInfo()
    This method discovers the attributes and operations this MBean exposes for management.

    Specified by:
    getMBeanInfo in interface javax.management.DynamicMBean
    Returns:
    An instance of MBeanInfo allowing to retrieve all attributes and operations of this MBean.

    getAttribute

    public java.lang.Object getAttribute(java.lang.String attribute)
                                  throws javax.management.AttributeNotFoundException,
                                         javax.management.MBeanException,
                                         javax.management.ReflectionException
    Gets the value of a specific attribute of this MBean.

    Specified by:
    getAttribute in interface javax.management.DynamicMBean
    Parameters:
    attribute - A String specifying the name of the attribute to be retrieved.
    Returns:
    The value of the retrieved attribute.
    Throws:
    javax.management.AttributeNotFoundException - if the attibute is not found.
    javax.management.MBeanException - for MBean exceptions.
    javax.management.ReflectionException - this wraps all the exceptions during Reflection.

    getAttributes

    public javax.management.AttributeList getAttributes(java.lang.String[] attributes)
    Enables the values of several attributes of this MBean.

    Specified by:
    getAttributes in interface javax.management.DynamicMBean
    Parameters:
    attributes - A list of attributes to be retrieved.
    Returns:
    The value of the retrieved attributes as attributeList.

    invoke

    public java.lang.Object invoke(java.lang.String actionName,
                                   java.lang.Object[] params,
                                   java.lang.String[] signature)
                            throws javax.management.MBeanException,
                                   javax.management.ReflectionException
    Invokes an action on this MBean.

    Specified by:
    invoke in interface javax.management.DynamicMBean
    Parameters:
    actionName - The name of the action to be invoked.
    params - An array containing the parameters to be set when the action is invoked
    signature - An array containing the signature of the action. The class objects will be loaded using the same class loader as the one used for loading the MBean on which the action was invoked.
    Returns:
    The object returned by the action, which represents the result ofinvoking the action on the specified MBean.
    Throws:
    javax.management.MBeanException - for MBean exceptions.
    javax.management.ReflectionException - this wraps all the exceptions during Reflection.

    setAttribute

    public void setAttribute(javax.management.Attribute attribute)
                      throws javax.management.AttributeNotFoundException,
                             javax.management.InvalidAttributeValueException,
                             javax.management.MBeanException,
                             javax.management.ReflectionException
    Sets the value of a specific attribute of this MBean.

    Specified by:
    setAttribute in interface javax.management.DynamicMBean
    Parameters:
    attribute - The identification of the attribute to be set and the value it is to be set to.
    Throws:
    javax.management.AttributeNotFoundException - if the attibute is not found.
    javax.management.InvalidAttributeValueException - if the value of the attibute is not valid.
    javax.management.MBeanException - for MBean exceptions.
    javax.management.ReflectionException - this wraps all the exceptions during Reflection.

    setAttributes

    public javax.management.AttributeList setAttributes(javax.management.AttributeList attributes)
    Sets the values of several attributes of this MBean.

    Specified by:
    setAttributes in interface javax.management.DynamicMBean
    Parameters:
    attributes - A list of attributes: The identification of the attributes to be set and the values they are to be set to.
    Returns:
    The list of attributes that were set, with their new values.

    getSnmpInPkts

    public java.lang.Long getSnmpInPkts()
    Handles the SNMP Get Request for snmpInPkts

    Returns:
    The SnmpInPkts value.

    getSnmpOutPkts

    public java.lang.Long getSnmpOutPkts()
    Handles the SNMP Get Request for snmpOutPkts

    Returns:
    The SnmpOutPkts value.

    getSnmpInBadVersions

    public java.lang.Long getSnmpInBadVersions()
    Handles the SNMP Get Request for snmpInBadVersions

    Returns:
    The SnmpInBadVersions value

    getSnmpInBadCommunityNames

    public java.lang.Long getSnmpInBadCommunityNames()
    Handles the SNMP Get Request for snmpInBadCommunityNames

    Returns:
    The SnmpInBadCommunityNames value

    getSnmpInBadCommunityUses

    public java.lang.Long getSnmpInBadCommunityUses()
    Handles the SNMP Get Request for snmpInBadCommunityUses

    Returns:
    The SnmpInBadCommunityUses value

    getSnmpInASNParseErrs

    public java.lang.Long getSnmpInASNParseErrs()
    Handles the SNMP Get Request for snmpInASNParseErrs

    Returns:
    The SnmpInASNParseErrs value

    getSnmpInTooBigs

    public java.lang.Long getSnmpInTooBigs()
    Handles the SNMP Get Request for snmpInTooBigs

    Returns:
    The SnmpInTooBigs value

    getSnmpInNoSuchNames

    public java.lang.Long getSnmpInNoSuchNames()
    Handles the SNMP Get Request for snmpInNoSuchNames

    Returns:
    The SnmpInNoSuchNames value

    getSnmpInBadValues

    public java.lang.Long getSnmpInBadValues()
    Handles the SNMP Get Request for snmpInBadValues

    Returns:
    The SnmpInBadValues value

    getSnmpInReadOnlys

    public java.lang.Long getSnmpInReadOnlys()
    Handles the SNMP Get Request for snmpInReadOnlys

    Returns:
    The SnmpInReadOnlys value

    getSnmpInGenErrs

    public java.lang.Long getSnmpInGenErrs()
    Handles the SNMP Get Request for snmpInGenErrs

    Returns:
    The SnmpInGenErrs value

    getSnmpInTotalReqVars

    public java.lang.Long getSnmpInTotalReqVars()
    Handles the SNMP Get Request for snmpInTotalReqVars

    Returns:
    The SnmpInTotalReqVars value

    getSnmpInTotalSetVars

    public java.lang.Long getSnmpInTotalSetVars()
    Handles the SNMP Get Request for snmpInTotalSetVars

    Returns:
    The SnmpInTotalSetVars value

    getSnmpInGetRequests

    public java.lang.Long getSnmpInGetRequests()
    Handles the SNMP Get Request for snmpInGetRequests

    Returns:
    The SnmpInGetRequests value

    getSnmpInGetNexts

    public java.lang.Long getSnmpInGetNexts()
    Handles the SNMP Get Request for snmpInGetNexts

    Returns:
    The SnmpInGetNexts value

    getSnmpInSetRequests

    public java.lang.Long getSnmpInSetRequests()
    Handles the SNMP Get Request for snmpInSetRequests

    Returns:
    The SnmpInSetRequests value

    getSnmpInGetResponses

    public java.lang.Long getSnmpInGetResponses()
    Handles the SNMP Get Request for snmpInGetResponses


    getSnmpInTraps

    public java.lang.Long getSnmpInTraps()
    Handles the SNMP Get Request for snmpInTraps

    Returns:
    The SnmpInTraps value

    getSnmpOutTooBigs

    public java.lang.Long getSnmpOutTooBigs()
    Handles the SNMP Get Request for snmpOutTooBigs

    Returns:
    The SnmpOutTooBigs value

    getSnmpOutNoSuchNames

    public java.lang.Long getSnmpOutNoSuchNames()
    Handles the SNMP Get Request for snmpOutNoSuchNames

    Returns:
    The SnmpOutNoSuchNames value

    getSnmpOutBadValues

    public java.lang.Long getSnmpOutBadValues()
    Handles the SNMP Get Request for snmpOutBadValues

    Returns:
    The SnmpOutBadValues value

    getSnmpOutGenErrs

    public java.lang.Long getSnmpOutGenErrs()
    Handles the SNMP Get Request for snmpOutGenErrs

    Returns:
    The SnmpOutGenErrs value

    getSnmpOutGetRequests

    public java.lang.Long getSnmpOutGetRequests()
    Handles the SNMP Get Request for snmpOutGetRequests

    Returns:
    The SnmpOutGetRequests value

    getSnmpOutGetNexts

    public java.lang.Long getSnmpOutGetNexts()
    Handles the SNMP Get Request for snmpOutGetNexts

    Returns:
    The SnmpOutGetNexts value

    getSnmpOutSetRequests

    public java.lang.Long getSnmpOutSetRequests()
    Handles the SNMP Get Request for snmpOutSetRequests

    Returns:
    The SnmpOutSetRequests value

    getSnmpOutGetResponses

    public java.lang.Long getSnmpOutGetResponses()
    Handles the SNMP Get Request for snmpOutGetResponses

    Returns:
    The SnmpOutGetResponses value

    getSnmpOutTraps

    public java.lang.Long getSnmpOutTraps()
    Handles the SNMP Get Request for snmpOutTraps

    Returns:
    The SnmpOutTraps value

    getSnmpEnableAuthenTraps

    public java.lang.Integer getSnmpEnableAuthenTraps()
    Handles the SNMP Get Request for snmpEnableAuthenTraps

    Returns:
    Integer specifying whether AuthenTraps has been enabled or not

    setSnmpEnableAuthenTraps

    public void setSnmpEnableAuthenTraps(java.lang.Integer val)
    Handles the SNMP Set Request for snmpEnableAuthenTraps

    Parameters:
    val - the value to be set to EnableAuthenTraps