gnu.java.lang.management
Class BeanImpl
- DynamicMBean
A common superclass for bean implementations.
cacheMBeanInfo , getAttribute , getAttributes , getCachedMBeanInfo , getClassName , getConstructors , getDescription , getDescription , getDescription , getDescription , getDescription , getDescription , getDescription , getImpact , getImplementation , getImplementationClass , getMBeanInfo , getMBeanInterface , getParameterName , getParameterName , invoke , setAttribute , setAttributes , setImplementation |
clone , equals , extends Object> getClass , finalize , hashCode , notify , notifyAll , toString , wait , wait , wait |
cacheMBeanInfo
protected void cacheMBeanInfo(MBeanInfo info)
Caches the
MBeanInfo
instance for this object. This is a
customization hook, so that subclasses can choose the caching policy
used. The default implementation caches the value in the instance
itself. Subclasses may override this so as to not cache the data
at all, or so as to use a cache shared between multiple beans.
- cacheMBeanInfo in interface StandardMBean
info
- the MBeanInfo
instance to cache, or null
if there is no new value to cache. When the value is not
null
, the cache should replace the current value
with the value supplied here.
getCachedMBeanInfo
protected MBeanInfo getCachedMBeanInfo()
Returns the cached
MBeanInfo
instance for this object. This is a
customization hook, so that subclasses can choose the caching policy
used. The default implementation caches the value in the instance
itself, and returns this value on calls to this method.
- getCachedMBeanInfo in interface StandardMBean
- the cached
MBeanInfo
instance, or null
if no value is cached.
getMBeanInfo
public MBeanInfo getMBeanInfo()
Returns an information object which lists the attributes
and actions associated with the management bean. This
implementation proceeds as follows:
StandardMBean.getCachedMBeanInfo()
is called to obtain
the cached instance. If this returns a non-null value,
this value is returned.- If there is no cached value, then the method proceeds
to create one. During this process, the customization hooks
detailed in this class are called to allow the values used
to be overrided:
- For each attribute,
StandardMBean.getDescription(MBeanAttributeInfo)
is called. - For each constructor,
StandardMBean.getDescription(MBeanConstructorInfo)
is called,
along with StandardMBean.getDescription(MBeanConstructorInfo,MBeanParameterInfo,int)
and
StandardMBean.getParameterName(MBeanConstructorInfo,MBeanParameterInfo,int)
for each parameter. - The constructors may be replaced as a whole by
a call to
StandardMBean.getConstructors(MBeanConstructorInfo[],Object)
. - For each operation,
StandardMBean.getDescription(MBeanOperationInfo)
and
StandardMBean.getImpact(MBeanOperationInfo)
are called,
along with StandardMBean.getDescription(MBeanOperationInfo,MBeanParameterInfo,int)
and
StandardMBean.getParameterName(MBeanOperationInfo,MBeanParameterInfo,int)
for each parameter. StandardMBean.getClassName(MBeanInfo)
and
StandardMBean.getDescription(MBeanInfo)
are called to customise
the basic information about the class.- Finally,
StandardMBean.cacheMBeanInfo(MBeanInfo)
is called
with the created instance before it is returned.
- getMBeanInfo in interface DynamicMBean
- getMBeanInfo in interface StandardMBean
- a description of the management bean, including
all exposed attributes and actions.
BeanImpl.java - A common superclass for bean implementations.
Copyright (C) 2006 Free Software Foundation
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version.