Source Code Cross Referenced for ModelMBean.java in  » 6.0-JDK-Core » management » javax » management » modelmbean » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Home
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
26.ERP CRM Financial
27.ESB
28.Forum
29.Game
30.GIS
31.Graphic 3D
32.Graphic Library
33.Groupware
34.HTML Parser
35.IDE
36.IDE Eclipse
37.IDE Netbeans
38.Installer
39.Internationalization Localization
40.Inversion of Control
41.Issue Tracking
42.J2EE
43.J2ME
44.JBoss
45.JMS
46.JMX
47.Library
48.Mail Clients
49.Music
50.Net
51.Parser
52.PDF
53.Portal
54.Profiler
55.Project Management
56.Report
57.RSS RDF
58.Rule Engine
59.Science
60.Scripting
61.Search Engine
62.Security
63.Sevlet Container
64.Source Control
65.Swing Library
66.Template Engine
67.Test Coverage
68.Testing
69.UML
70.Web Crawler
71.Web Framework
72.Web Mail
73.Web Server
74.Web Services
75.Web Services apache cxf 2.2.6
76.Web Services AXIS2
77.Wiki Engine
78.Workflow Engines
79.XML
80.XML UI
Java Source Code / Java Documentation » 6.0 JDK Core » management » javax.management.modelmbean 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001        /*
002         * Portions Copyright 2000-2006 Sun Microsystems, Inc.  All Rights Reserved.
003         * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
004         *
005         * This code is free software; you can redistribute it and/or modify it
006         * under the terms of the GNU General Public License version 2 only, as
007         * published by the Free Software Foundation.  Sun designates this
008         * particular file as subject to the "Classpath" exception as provided
009         * by Sun in the LICENSE file that accompanied this code.
010         *
011         * This code is distributed in the hope that it will be useful, but WITHOUT
012         * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
013         * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
014         * version 2 for more details (a copy is included in the LICENSE file that
015         * accompanied this code).
016         *
017         * You should have received a copy of the GNU General Public License version
018         * 2 along with this work; if not, write to the Free Software Foundation,
019         * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
020         *
021         * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
022         * CA 95054 USA or visit www.sun.com if you need additional information or
023         * have any questions.
024         */
025        /*
026         * @(#)author    IBM Corp.
027         * 
028         * Copyright IBM Corp. 1999-2000.  All rights reserved.
029         */
030
031        package javax.management.modelmbean;
032
033        import javax.management.DynamicMBean;
034        import javax.management.InstanceNotFoundException;
035        import javax.management.MBeanException;
036        import javax.management.PersistentMBean;
037        import javax.management.RuntimeOperationsException;
038
039        /**
040         * This interface must be implemented by the ModelMBeans. An implementation of this interface
041         * must be shipped with every JMX Agent.
042         * <P>
043         * Java resources wishing to be manageable instantiate the ModelMBean using the MBeanServer's
044         * createMBean method.  The resource then sets the ModelMBeanInfo (with Descriptors) for the ModelMBean
045         * instance. The attributes and operations exposed via the ModelMBeanInfo for the ModelMBean are accessible
046         * from MBeans, connectors/adaptors like other MBeans. Through the ModelMBeanInfo Descriptors, values and methods in
047         * the managed application can be defined and mapped to attributes and operations of the ModelMBean.
048         * This mapping can be defined during development in an XML formatted file or dynamically and
049         * programmatically at runtime.
050         * <P>
051         * Every ModelMBean which is instantiated in the MBeanServer becomes manageable:
052         * its attributes and operations
053         * become remotely accessible through the connectors/adaptors connected to that MBeanServer.
054         * A Java object cannot be registered in the MBeanServer unless it is a JMX compliant MBean.
055         * By instantiating a ModelMBean, resources are guaranteed that the MBean is valid.
056         * <P>
057         * MBeanException and RuntimeOperationsException must be thrown on every public method.  This allows
058         * for wrapping exceptions from distributed communications (RMI, EJB, etc.).  These exceptions do
059         * not have to be thrown by the implementation except in the scenarios described in the specification
060         * and javadoc.
061         *
062         * @since 1.5
063         */
064
065        public interface ModelMBean extends DynamicMBean, PersistentMBean,
066                ModelMBeanNotificationBroadcaster {
067
068            /**
069             * Initializes a ModelMBean object using ModelMBeanInfo passed in.
070             * This method makes it possible to set a customized ModelMBeanInfo on
071             * the ModelMBean as long as it is not registered with the MBeanServer.
072             * <br>
073             * Once the ModelMBean's ModelMBeanInfo (with Descriptors) are
074             * customized and set on the ModelMBean, the  ModelMBean can be
075             * registered with the MBeanServer.
076             * <P>
077             * If the ModelMBean is currently registered, this method throws
078             * a {@link javax.management.RuntimeOperationsException} wrapping an
079             * {@link IllegalStateException}
080             *
081             * @param inModelMBeanInfo The ModelMBeanInfo object to be used
082             *        by the ModelMBean.
083             *
084             * @exception MBeanException Wraps a distributed communication
085             *        Exception.
086             * @exception RuntimeOperationsException
087             * <ul><li>Wraps an {@link IllegalArgumentException} if
088             *         the MBeanInfo passed in parameter is null.</li>
089             *     <li>Wraps an {@link IllegalStateException} if the ModelMBean
090             *         is currently registered in the MBeanServer.</li>
091             * </ul>
092             *
093             **/
094            public void setModelMBeanInfo(ModelMBeanInfo inModelMBeanInfo)
095                    throws MBeanException, RuntimeOperationsException;
096
097            /**
098             * Sets the instance handle of the object against which to
099             * execute all methods in this ModelMBean management interface
100             * (MBeanInfo and Descriptors).
101             *
102             * @param mr Object that is the managed resource
103             * @param mr_type The type of reference for the managed resource.  Can be: ObjectReference,
104             *               Handle, IOR, EJBHandle, RMIReference.
105             *               If the MBeanServer cannot process the mr_type passed in, an InvalidTargetTypeException
106             *               will be thrown.
107             *
108             *
109             * @exception MBeanException The initializer of the object has thrown an exception.
110             * @exception RuntimeOperationsException Wraps an IllegalArgumentException:
111             *       The managed resource type passed in parameter is null.
112             * @exception InstanceNotFoundException The managed resource object could not be found
113             * @exception InvalidTargetObjectTypeException The managed resource type cannot be processed by the
114             * ModelMBean or JMX Agent.
115             */
116            public void setManagedResource(Object mr, String mr_type)
117                    throws MBeanException, RuntimeOperationsException,
118                    InstanceNotFoundException, InvalidTargetObjectTypeException;
119
120        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.