org.snmp4j.agent.mo.jmx
Class MBeanAttributeMOInfo

java.lang.Object
  extended by org.snmp4j.agent.mo.jmx.MBeanMOInfo
      extended by org.snmp4j.agent.mo.jmx.MBeanAttributeMOInfo
Direct Known Subclasses:
MBeanAttributeKeyProvider, MBeanMultiAttributeMOInfo

public class MBeanAttributeMOInfo
extends MBeanMOInfo

The MBeanAttributeMOInfo describes an attribute of a MBean.

Version:
1.0
Author:
Frank Fock

Field Summary
protected  TypedAttribute attribute
           
 
Constructor Summary
MBeanAttributeMOInfo(javax.management.ObjectName name, java.lang.String attributeName, java.lang.Class attributeType)
          Creates an attribute description with the attributes name and type.
MBeanAttributeMOInfo(javax.management.ObjectName name, TypedAttribute attribute)
          Creates an attribute description with a TypedAttribute.
 
Method Summary
 TypedAttribute getAttribute()
           
 java.lang.Object getAttribute(javax.management.MBeanServerConnection server)
           
static java.lang.Object getAttribute(javax.management.MBeanServerConnection server, javax.management.ObjectName name, TypedAttribute attribute)
           
 java.lang.String getAttributeName()
           
 java.lang.Class getAttributeType()
           
 void setAttribute(javax.management.MBeanServerConnection server, java.lang.Object value)
           
static void setAttribute(javax.management.MBeanServerConnection server, javax.management.ObjectName name, TypedAttribute attribute, java.lang.Object value)
           
 
Methods inherited from class org.snmp4j.agent.mo.jmx.MBeanMOInfo
getMBeanNames, getObjectName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

attribute

protected TypedAttribute attribute
Constructor Detail

MBeanAttributeMOInfo

public MBeanAttributeMOInfo(javax.management.ObjectName name,
                            java.lang.String attributeName,
                            java.lang.Class attributeType)
Creates an attribute description with the attributes name and type.

Parameters:
name - the MBean's ObjectName.
attributeName - the name of the attribute.
attributeType - the class of the attributes value objects.

MBeanAttributeMOInfo

public MBeanAttributeMOInfo(javax.management.ObjectName name,
                            TypedAttribute attribute)
Creates an attribute description with a TypedAttribute.

Parameters:
name - the MBean's ObjectName.
attribute - a TypedAttribute describing the attribute. The value is by reference.
Method Detail

getAttributeName

public java.lang.String getAttributeName()

getAttributeType

public java.lang.Class getAttributeType()

getAttribute

public TypedAttribute getAttribute()

getAttribute

public java.lang.Object getAttribute(javax.management.MBeanServerConnection server)
                              throws javax.management.ReflectionException,
                                     javax.management.InstanceNotFoundException,
                                     javax.management.AttributeNotFoundException,
                                     javax.management.MBeanException,
                                     java.io.IOException
Throws:
javax.management.ReflectionException
javax.management.InstanceNotFoundException
javax.management.AttributeNotFoundException
javax.management.MBeanException
java.io.IOException

getAttribute

public static java.lang.Object getAttribute(javax.management.MBeanServerConnection server,
                                            javax.management.ObjectName name,
                                            TypedAttribute attribute)
                                     throws javax.management.ReflectionException,
                                            javax.management.InstanceNotFoundException,
                                            javax.management.AttributeNotFoundException,
                                            javax.management.MBeanException,
                                            java.io.IOException
Throws:
javax.management.ReflectionException
javax.management.InstanceNotFoundException
javax.management.AttributeNotFoundException
javax.management.MBeanException
java.io.IOException

setAttribute

public void setAttribute(javax.management.MBeanServerConnection server,
                         java.lang.Object value)
                  throws javax.management.ReflectionException,
                         javax.management.MBeanException,
                         javax.management.InvalidAttributeValueException,
                         javax.management.AttributeNotFoundException,
                         javax.management.InstanceNotFoundException,
                         java.io.IOException
Throws:
javax.management.ReflectionException
javax.management.MBeanException
javax.management.InvalidAttributeValueException
javax.management.AttributeNotFoundException
javax.management.InstanceNotFoundException
java.io.IOException

setAttribute

public static void setAttribute(javax.management.MBeanServerConnection server,
                                javax.management.ObjectName name,
                                TypedAttribute attribute,
                                java.lang.Object value)
                         throws javax.management.ReflectionException,
                                javax.management.MBeanException,
                                javax.management.InvalidAttributeValueException,
                                javax.management.AttributeNotFoundException,
                                javax.management.InstanceNotFoundException,
                                java.io.IOException
Throws:
javax.management.ReflectionException
javax.management.MBeanException
javax.management.InvalidAttributeValueException
javax.management.AttributeNotFoundException
javax.management.InstanceNotFoundException
java.io.IOException

Copyright 2006-2007 Frank Fock (SNMP4J.org)