Source Code Cross Referenced for RegistryMBean.java in  » Library » Apache-commons-modeler-2.0.1-src » org » apache » commons » modeler » 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 » Library » Apache commons modeler 2.0.1 src » org.apache.commons.modeler 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Licensed to the Apache Software Foundation (ASF) under one or more
003:         * contributor license agreements.  See the NOTICE file distributed with
004:         * this work for additional information regarding copyright ownership.
005:         * The ASF licenses this file to You under the Apache License, Version 2.0
006:         * (the "License"); you may not use this file except in compliance with
007:         * the License.  You may obtain a copy of the License at
008:         * 
009:         *      http://www.apache.org/licenses/LICENSE-2.0
010:         * 
011:         * Unless required by applicable law or agreed to in writing, software
012:         * distributed under the License is distributed on an "AS IS" BASIS,
013:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014:         * See the License for the specific language governing permissions and
015:         * limitations under the License.
016:         */
017:
018:        package org.apache.commons.modeler;
019:
020:        import java.util.List;
021:
022:        /**
023:         * Interface for modeler MBeans.
024:         * 
025:         * This is the main entry point into modeler. It provides methods to create
026:         * and manipulate model mbeans and simplify their use.
027:         *
028:         * Starting with version 1.1, this is no longer a singleton and the static
029:         * methods are strongly deprecated. In a container environment we can expect
030:         * different applications to use different registries.
031:         * 
032:         * @author Craig R. McClanahan
033:         * @author Costin Manolache
034:         * 
035:         * @since 1.1
036:         */
037:        public interface RegistryMBean {
038:
039:            /** 
040:             * Load an extended mlet file. The source can be an URL, File or
041:             * InputStream. 
042:             * 
043:             * All mbeans will be instantiated, registered and the attributes will be 
044:             * set. The result is a list of ObjectNames.
045:             *
046:             * @param source InputStream or URL of the file
047:             * @param cl ClassLoader to be used to load the mbeans, or null to use the
048:             *        default JMX mechanism ( i.e. all registered loaders )
049:             * @return List of ObjectName for the loaded mbeans
050:             * @throws Exception
051:             * 
052:             * @since 1.1
053:             */
054:            public List loadMBeans(Object source, ClassLoader cl)
055:                    throws Exception;
056:
057:            /** Invoke an operation on a set of mbeans. 
058:             * 
059:             * @param mbeans List of ObjectNames
060:             * @param operation Operation to perform. Typically "init" "start" "stop" or "destroy"
061:             * @param failFirst Behavior in case of exceptions - if false we'll ignore
062:             *      errors
063:             * @throws Exception
064:             */
065:            public void invoke(List mbeans, String operation, boolean failFirst)
066:                    throws Exception;
067:
068:            /** Register a bean by creating a modeler mbean and adding it to the 
069:             * MBeanServer.
070:             * 
071:             * If metadata is not loaded, we'll look up and read a file named
072:             * "mbeans-descriptors.ser" or "mbeans-descriptors.xml" in the same package
073:             * or parent.
074:             *
075:             * If the bean is an instance of DynamicMBean. it's metadata will be converted
076:             * to a model mbean and we'll wrap it - so modeler services will be supported
077:             *
078:             * If the metadata is still not found, introspection will be used to extract
079:             * it automatically. 
080:             * 
081:             * If an mbean is already registered under this name, it'll be first
082:             * unregistered.
083:             * 
084:             * If the component implements MBeanRegistration, the methods will be called.
085:             * If the method has a method "setRegistry" that takes a RegistryMBean as
086:             * parameter, it'll be called with the current registry.
087:             * 
088:             *
089:             * @param bean Object to be registered
090:             * @param oname Name used for registration
091:             * @param type The type of the mbean, as declared in mbeans-descriptors. If
092:             * null, the name of the class will be used. This can be used as a hint or
093:             * by subclasses.
094:             *
095:             * @since 1.1
096:             */
097:            public void registerComponent(Object bean, String oname, String type)
098:                    throws Exception;
099:
100:            /** Unregister a component. We'll first check if it is registered,
101:             * and mask all errors. This is mostly a helper.
102:             * 
103:             * @param oname
104:             * 
105:             * @since 1.1
106:             */
107:            public void unregisterComponent(String oname);
108:
109:            /** Return an int ID for faster access. Will be used for notifications
110:             * and for other operations we want to optimize. 
111:             *
112:             * @param domain Namespace 
113:             * @param name  Type of the notification
114:             * @return  An unique id for the domain:name combination
115:             * @since 1.1
116:             */
117:            public int getId(String domain, String name);
118:
119:            /** Reset all metadata cached by this registry. Should be called 
120:             * to support reloading. Existing mbeans will not be affected or modified.
121:             * 
122:             * It will be called automatically if the Registry is unregistered.
123:             * @since 1.1
124:             */
125:            public void stop();
126:
127:            /** Load descriptors. The source can be a File, URL pointing to an
128:             * mbeans-descriptors.xml.
129:             * 
130:             * Also ( experimental for now ) a ClassLoader - in which case META-INF/ will
131:             * be used.
132:             * 
133:             * @param source
134:             */
135:            public void loadMetadata(Object source) throws Exception;
136:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.