Java Doc for StandardMBean.java in  » JMX » mx4j » javax » management » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » JMX » mx4j » javax.management 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   javax.management.StandardMBean

All known Subclasses:   mx4j.tools.i18n.I18NStandardMBean,  mx4j.monitor.MX4JMonitor,
StandardMBean
public class StandardMBean implements DynamicMBean(Code)
StandardMBean eases the development of MBeans that have a management interface described by a java interface, like plain standard MBeans have; differently from a plain standard MBean, StandardMBean is not tied to the JMX lexical patterns and allows more control on the customization of the MBeanInfo that describes the MBean (for example it allows to describe metadata descriptions).
Usage of StandardMBean with a management interface that does not follow the JMX lexical patterns:
 public interface Management
 {
 ...
 }
 

public class Service implements Management { ... }

Service service = new Service(); StandardMBean mbean = new StandardMBean(service, Management.class); MBeanServer server = ...; ObjectName name = ...; server.registerMBean(mbean, name);

Usage of a subclass of StandardMBean:
 public interface Management
 {
 ...
 }
 

public class Service extends StandardMBean implements Management { public Service() { super(Manegement.class); } ... }

Service mbean = new Service(); MBeanServer server = ...; ObjectName name = ...; server.registerMBean(mbean, name);

Usage of StandardMBean with a management interface that follows the JMX lexical patterns (this is similar to plain standard MBeans):
 public interface ServiceMBean
 {
 ...
 }
 

public class Service implements ServiceMBean { ... }

Service service = new Service(); StandardMBean mbean = new StandardMBean(service, null); MBeanServer server = ...; ObjectName name = ...; server.registerMBean(mbean, name);


version:
   $Revision: 1.5 $
since:
   JMX 1.2



Constructor Summary
public  StandardMBean(Object implementation, Class management)
     Creates a new StandardMBean.
protected  StandardMBean(Class managementInterface)
     Creates a new StandardMBean using 'this' as implementation.

Method Summary
protected  voidcacheMBeanInfo(MBeanInfo info)
     Caches the given MBeanInfo after it has been created, by introspection, with the information provided to constructors.
public  ObjectgetAttribute(String attribute)
    
public  AttributeListgetAttributes(String[] attributes)
    
protected  MBeanInfogetCachedMBeanInfo()
     Returns the cached MBeanInfo, or null if the MBeanInfo is not cached.
protected  StringgetClassName(MBeanInfo info)
     Returns the class name of this MBean.
protected  MBeanConstructorInfo[]getConstructors(MBeanConstructorInfo[] constructors, Object implementation)
     Returns, by default, the given constructors if implementation is 'this' object or null, otherwise returns null.
protected  StringgetDescription(MBeanInfo info)
     Returns the description for this MBean.
protected  StringgetDescription(MBeanFeatureInfo info)
     Returns the description for the given feature.
protected  StringgetDescription(MBeanAttributeInfo info)
     Returns the description for the given attribute.
protected  StringgetDescription(MBeanConstructorInfo info)
     Returns the description for the given constructor.
protected  StringgetDescription(MBeanOperationInfo info)
     Returns the description for the given operation.
protected  StringgetDescription(MBeanConstructorInfo constructor, MBeanParameterInfo param, int sequence)
     Returns the description of the (sequence + 1)th parameter (that is: if sequence is 0 returns the description of the first parameter, if sequence is 1 returns the description of the second parameter, and so on) for the given constructor.
protected  StringgetDescription(MBeanOperationInfo operation, MBeanParameterInfo param, int sequence)
     Returns the description of the (sequence + 1)th parameter (that is: if sequence is 0 returns the description of the first parameter, if sequence is 1 returns the description of the second parameter, and so on) for the given operation.
protected  intgetImpact(MBeanOperationInfo info)
     Returns the impact flag for the given MBeanOperationInfo.
public  ObjectgetImplementation()
    
public  ClassgetImplementationClass()
     Returns the class of the MBean implementation for this StandardMBean, or 'this' (sub)class if no implementation was supplied.
public  MBeanInfogetMBeanInfo()
     See DynamicMBean.getMBeanInfo .
final public  ClassgetMBeanInterface()
     Returns the management interface for this MBean.
protected  StringgetParameterName(MBeanConstructorInfo constructor, MBeanParameterInfo param, int sequence)
     Returns the name of the (sequence + 1)th parameter (that is: if sequence is 0 returns the name of the first parameter, if sequence is 1 returns the name of the second parameter, and so on) for the given constructor.
protected  StringgetParameterName(MBeanOperationInfo operation, MBeanParameterInfo param, int sequence)
     Returns the name of the (sequence + 1)th parameter (that is: if sequence is 0 returns the name of the first parameter, if sequence is 1 returns the name of the second parameter, and so on) for the given operation.
public  Objectinvoke(String method, Object[] arguments, String[] params)
    
public  voidsetAttribute(Attribute attribute)
    
public  AttributeListsetAttributes(AttributeList attributes)
    
public  voidsetImplementation(Object implementation)
     Sets the MBean implementation for this StandardMBean.


Constructor Detail
StandardMBean
public StandardMBean(Object implementation, Class management) throws NotCompliantMBeanException(Code)
Creates a new StandardMBean.
Parameters:
  implementation - The MBean implementation for this StandardMBean
Parameters:
  management - The management interface; if null, the JMX lexical patterns will be used
throws:
  IllegalArgumentException - If implementation is null
throws:
  NotCompliantMBeanException - If implementation does not implement managementInterface,or if the management interface is not a valid JMX Management Interface
See Also:   StandardMBean.setImplementation



StandardMBean
protected StandardMBean(Class managementInterface) throws NotCompliantMBeanException(Code)
Creates a new StandardMBean using 'this' as implementation.
See Also:   StandardMBean.StandardMBean(Object,Class)




Method Detail
cacheMBeanInfo
protected void cacheMBeanInfo(MBeanInfo info)(Code)
Caches the given MBeanInfo after it has been created, by introspection, with the information provided to constructors.
Override to disable caching, or to install different caching policies.
Parameters:
  info - The MBeanInfo to cache; if it is null, the cache is cleared.
See Also:   StandardMBean.getCachedMBeanInfo
See Also:   StandardMBean.getMBeanInfo



getAttribute
public Object getAttribute(String attribute) throws AttributeNotFoundException, MBeanException, ReflectionException(Code)



getAttributes
public AttributeList getAttributes(String[] attributes)(Code)



getCachedMBeanInfo
protected MBeanInfo getCachedMBeanInfo()(Code)
Returns the cached MBeanInfo, or null if the MBeanInfo is not cached.
See Also:   StandardMBean.cacheMBeanInfo
See Also:   StandardMBean.getMBeanInfo



getClassName
protected String getClassName(MBeanInfo info)(Code)
Returns the class name of this MBean.
By default returns MBeanInfo.getClassName info.getClassName()



getConstructors
protected MBeanConstructorInfo[] getConstructors(MBeanConstructorInfo[] constructors, Object implementation)(Code)
Returns, by default, the given constructors if implementation is 'this' object or null, otherwise returns null.
Since the MBean that is registered in an MBeanServer is always an instance of StandardMBean, there is no meaning in providing MBeanConstructorInfo if the implementation passed to StandardMBean.StandardMBean(Object,Class) is not 'this' object.



getDescription
protected String getDescription(MBeanInfo info)(Code)
Returns the description for this MBean.
By default returns MBeanInfo.getDescription info.getDescription()



getDescription
protected String getDescription(MBeanFeatureInfo info)(Code)
Returns the description for the given feature.
By default returns MBeanFeatureInfo.getDescription info.getDescription()
See Also:   StandardMBean.getDescription(MBeanAttributeInfo)
See Also:   StandardMBean.getDescription(MBeanConstructorInfo)
See Also:   StandardMBean.getDescription(MBeanOperationInfo)



getDescription
protected String getDescription(MBeanAttributeInfo info)(Code)
Returns the description for the given attribute.
By default calls StandardMBean.getDescription(MBeanFeatureInfo)



getDescription
protected String getDescription(MBeanConstructorInfo info)(Code)
Returns the description for the given constructor.
By default calls StandardMBean.getDescription(MBeanFeatureInfo)



getDescription
protected String getDescription(MBeanOperationInfo info)(Code)
Returns the description for the given operation.
By default calls StandardMBean.getDescription(MBeanFeatureInfo)



getDescription
protected String getDescription(MBeanConstructorInfo constructor, MBeanParameterInfo param, int sequence)(Code)
Returns the description of the (sequence + 1)th parameter (that is: if sequence is 0 returns the description of the first parameter, if sequence is 1 returns the description of the second parameter, and so on) for the given constructor.
By default returns MBeanParameterInfo.getDescription param.getDescription() .



getDescription
protected String getDescription(MBeanOperationInfo operation, MBeanParameterInfo param, int sequence)(Code)
Returns the description of the (sequence + 1)th parameter (that is: if sequence is 0 returns the description of the first parameter, if sequence is 1 returns the description of the second parameter, and so on) for the given operation.
By default returns MBeanParameterInfo.getDescription param.getDescription() .



getImpact
protected int getImpact(MBeanOperationInfo info)(Code)
Returns the impact flag for the given MBeanOperationInfo.
By default returns MBeanOperationInfo.getImpact info.getImpact()



getImplementation
public Object getImplementation()(Code)
Returns the implementation supplied to this StandardMBean, or this object if no implementation was supplied
See Also:   StandardMBean.StandardMBean(Object,Class)
See Also:   StandardMBean.setImplementation



getImplementationClass
public Class getImplementationClass()(Code)
Returns the class of the MBean implementation for this StandardMBean, or 'this' (sub)class if no implementation was supplied.
See Also:    #StandardMBean(Object,Class)}



getMBeanInfo
public MBeanInfo getMBeanInfo()(Code)
See DynamicMBean.getMBeanInfo .
By default, the metadata is cached the first time is created; if the caching has been disabled, the metadata is created from scratch each time.
See Also:   StandardMBean.getCachedMBeanInfo
See Also:   StandardMBean.cacheMBeanInfo



getMBeanInterface
final public Class getMBeanInterface()(Code)
Returns the management interface for this MBean. This interface is set at creation time and cannot be changed even if the implementation object can be changed (but it must implement the same interface).
See Also:    #StandardMBean(Object,Class)}
See Also:   StandardMBean.setImplementation



getParameterName
protected String getParameterName(MBeanConstructorInfo constructor, MBeanParameterInfo param, int sequence)(Code)
Returns the name of the (sequence + 1)th parameter (that is: if sequence is 0 returns the name of the first parameter, if sequence is 1 returns the name of the second parameter, and so on) for the given constructor.
By default returns MBeanParameterInfo.getName param.getName() .



getParameterName
protected String getParameterName(MBeanOperationInfo operation, MBeanParameterInfo param, int sequence)(Code)
Returns the name of the (sequence + 1)th parameter (that is: if sequence is 0 returns the name of the first parameter, if sequence is 1 returns the name of the second parameter, and so on) for the given operation.
By default returns MBeanParameterInfo.getName param.getName() .



invoke
public Object invoke(String method, Object[] arguments, String[] params) throws MBeanException, ReflectionException(Code)



setAttribute
public void setAttribute(Attribute attribute) throws AttributeNotFoundException, InvalidAttributeValueException, MBeanException, ReflectionException(Code)



setAttributes
public AttributeList setAttributes(AttributeList attributes)(Code)



setImplementation
public void setImplementation(Object implementation) throws NotCompliantMBeanException(Code)
Sets the MBean implementation for this StandardMBean.
Parameters:
  implementation - The MBean implementation for this StandardMBean
throws:
  IllegalArgumentException - If implementation is null
throws:
  NotCompliantMBeanException - If implementation does not implement the management interfacereturned by StandardMBean.getMBeanInterface
See Also:   StandardMBean.StandardMBean(Object,Class)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.