com.mysql.management.jmx
Class SimpleMysqldDynamicMBean

java.lang.Object
  extended by com.mysql.management.jmx.SimpleMysqldDynamicMBean
All Implemented Interfaces:
javax.management.DynamicMBean
Direct Known Subclasses:
JBossMysqldDynamicMBean, MysqldDynamicMBean

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

MySQL DynamicMBean

Version:
$Id: SimpleMysqldDynamicMBean.java,v 1.1 2005/02/16 21:46:11 eherman Exp $
Author:
Eric Herman

Field Summary
static java.lang.String AUTOSTART_ATTR
           
static java.lang.String START_METHOD
           
static java.lang.String STOP_METHOD
           
 
Constructor Summary
  SimpleMysqldDynamicMBean()
          Directs output generated by MySQL to Standard Out and Standard Error.
protected SimpleMysqldDynamicMBean(MysqldFactory mysqldFactory)
          This constructor is useful for tests which need to have "stub" or "mock" implementations of the underlying MySQL resource.
 
Method Summary
protected  void clearMBeanInfo()
           
 java.lang.Object getAttribute(java.lang.String attributeName)
           
 javax.management.AttributeList getAttributes(java.lang.String[] attributeNames)
          Given an array of command line option names, an "AttributeList" is created containing those option names and the values for each.
 javax.management.MBeanInfo getMBeanInfo()
          Returns an MBeanInfo object knowing the class name, what attributes are available, the constructor information, and either the start or stop method information.
protected  java.util.List getMBeanOperationInfoList()
           
 java.lang.Object invoke(java.lang.String methodName, java.lang.Object[] args, java.lang.String[] types)
          Allows the JMX Agent to pass along calls of "startMysqld" or "startMysqld" with no args of any type
protected  javax.management.MBeanOperationInfo newVoidMBeanOperation(java.lang.String method, java.lang.String description)
           
 void setAttribute(javax.management.Attribute attribute)
          Allows the JMX Agent to set a command line option to be used when MySQL is launched.
 javax.management.AttributeList setAttributes(javax.management.AttributeList attributes)
          Allows the JMX Agent to set a number of command line options at once.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AUTOSTART_ATTR

public static final java.lang.String AUTOSTART_ATTR
See Also:
Constant Field Values

START_METHOD

public static final java.lang.String START_METHOD
See Also:
Constant Field Values

STOP_METHOD

public static final java.lang.String STOP_METHOD
See Also:
Constant Field Values
Constructor Detail

SimpleMysqldDynamicMBean

public SimpleMysqldDynamicMBean()
Directs output generated by MySQL to Standard Out and Standard Error. This is the constructor included in the MBeanInfo.


SimpleMysqldDynamicMBean

protected SimpleMysqldDynamicMBean(MysqldFactory mysqldFactory)
This constructor is useful for tests which need to have "stub" or "mock" implementations of the underlying MySQL resource. This constructor is not included int the MBeanInfo.

Method Detail

getMBeanOperationInfoList

protected java.util.List getMBeanOperationInfoList()

getAttribute

public java.lang.Object getAttribute(java.lang.String attributeName)
                              throws javax.management.AttributeNotFoundException
Specified by:
getAttribute in interface javax.management.DynamicMBean
Parameters:
attributeName - represents a command line argument to a MySQL database.
Returns:
a String with the value associated the argument
Throws:
javax.management.AttributeNotFoundException

getAttributes

public javax.management.AttributeList getAttributes(java.lang.String[] attributeNames)
Given an array of command line option names, an "AttributeList" is created containing those option names and the values for each. Called by a JMX Agent

Specified by:
getAttributes in interface javax.management.DynamicMBean

getMBeanInfo

public javax.management.MBeanInfo getMBeanInfo()
Returns an MBeanInfo object knowing the class name, what attributes are available, the constructor information, and either the start or stop method information.

Specified by:
getMBeanInfo in interface javax.management.DynamicMBean

invoke

public java.lang.Object invoke(java.lang.String methodName,
                               java.lang.Object[] args,
                               java.lang.String[] types)
                        throws javax.management.ReflectionException
Allows the JMX Agent to pass along calls of "startMysqld" or "startMysqld" with no args of any type

Specified by:
invoke in interface javax.management.DynamicMBean
Throws:
javax.management.ReflectionException

clearMBeanInfo

protected void clearMBeanInfo()

setAttribute

public void setAttribute(javax.management.Attribute attribute)
                  throws javax.management.AttributeNotFoundException
Allows the JMX Agent to set a command line option to be used when MySQL is launched.

Specified by:
setAttribute in interface javax.management.DynamicMBean
Throws:
javax.management.AttributeNotFoundException - ReflectionException

setAttributes

public javax.management.AttributeList setAttributes(javax.management.AttributeList attributes)
Allows the JMX Agent to set a number of command line options at once.

Specified by:
setAttributes in interface javax.management.DynamicMBean

newVoidMBeanOperation

protected javax.management.MBeanOperationInfo newVoidMBeanOperation(java.lang.String method,
                                                                    java.lang.String description)


Copyright © 2004-2011. All Rights Reserved.