Source Code Cross Referenced for RMIConnectorImpl.java in  » J2EE » JOnAS-4.8.6 » org » objectweb » jonas » jmx » 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 » J2EE » JOnAS 4.8.6 » org.objectweb.jonas.jmx 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**
002:         * JOnAS: Java(TM) Open Application Server
003:         * Copyright (C) 1999 Bull S.A.
004:         * Contact: jonas-team@objectweb.org
005:         *
006:         * This library is free software; you can redistribute it and/or
007:         * modify it under the terms of the GNU Lesser General Public
008:         * License as published by the Free Software Foundation; either
009:         * version 2.1 of the License, or any later version.
010:         *
011:         * This library is distributed in the hope that it will be useful,
012:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
013:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
014:         * Lesser General Public License for more details.
015:         *
016:         * You should have received a copy of the GNU Lesser General Public
017:         * License along with this library; if not, write to the Free Software
018:         * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
019:         * USA
020:         *
021:         * --------------------------------------------------------------------------
022:         * $Id: RMIConnectorImpl.java 4654 2004-04-27 14:44:22Z danesa $
023:         * --------------------------------------------------------------------------
024:         */package org.objectweb.jonas.jmx;
025:
026:        import javax.management.Attribute;
027:        import javax.management.AttributeList;
028:        import javax.management.AttributeNotFoundException;
029:        import javax.management.InstanceNotFoundException;
030:        import javax.management.IntrospectionException;
031:        import javax.management.InvalidAttributeValueException;
032:        import javax.management.MBeanException;
033:        import javax.management.MBeanInfo;
034:        import javax.management.MBeanServer;
035:        import javax.management.NotificationFilter;
036:        import javax.management.NotificationListener;
037:        import javax.management.ObjectName;
038:        import javax.management.QueryExp;
039:        import javax.management.ReflectionException;
040:        import javax.rmi.PortableRemoteObject;
041:        import java.rmi.RemoteException;
042:
043:        /**
044:         * Implements RMIConnector, the interface for JMX Remote Calls used by thr management applications.
045:         * Uses a simple remote delegation of the JMX methods called by the management applications.
046:         *
047:         * @author Michel Bruno and Guillaume Riviere
048:         */
049:        public class RMIConnectorImpl extends PortableRemoteObject implements 
050:                RMIConnector {
051:            protected MBeanServer server;
052:
053:            public RMIConnectorImpl(MBeanServer server) throws RemoteException {
054:                super ();
055:                this .server = server;
056:            }
057:
058:            /**
059:             * Gets the names of MBeans controlled by the MBean server.
060:             * @param name - The object name pattern identifying the MBeans to be retrieved.
061:             * @param query - The query expression to be applied for selecting MBeans.
062:             * @return A set containing the ObjectNames for the MBeans selected.
063:             * If no MBean satisfies the query, an empty list is returned.
064:             */
065:            public java.util.Set queryNames(ObjectName name, QueryExp query)
066:                    throws RemoteException {
067:                return server.queryNames(name, query);
068:            }
069:
070:            /**
071:             * Checks whether an MBean, identified by its object name, is
072:             * already registered with the MBean server.
073:             * @param name - The object name pattern identifying the MBeans
074:             */
075:            public boolean isRegistered(ObjectName name) throws RemoteException {
076:                return server.isRegistered(name);
077:            }
078:
079:            /**
080:             * Gets the value of a specific attribute of a named MBean.
081:             * @param name - The name of the MBean
082:             * @param attribute - the name of the attribute to be retrieved.
083:             * @return The value of the retrieved attribute.
084:             */
085:            public java.lang.Object getAttribute(ObjectName name,
086:                    java.lang.String attribute) throws MBeanException,
087:                    AttributeNotFoundException, InstanceNotFoundException,
088:                    ReflectionException, RemoteException {
089:                return server.getAttribute(name, attribute);
090:            }
091:
092:            public AttributeList getAttributes(ObjectName name,
093:                    String[] attributes) throws InstanceNotFoundException,
094:                    ReflectionException, RemoteException {
095:                return server.getAttributes(name, attributes);
096:            }
097:
098:            /**
099:             * Sets the value of a specific attribute of a named MBean.
100:             * @param name - The name of the MBean
101:             */
102:            public void setAttribute(ObjectName name, Attribute attribute)
103:                    throws InstanceNotFoundException,
104:                    AttributeNotFoundException, InvalidAttributeValueException,
105:                    MBeanException, ReflectionException, RemoteException {
106:                server.setAttribute(name, attribute);
107:            }
108:
109:            public AttributeList setAttributes(ObjectName name,
110:                    AttributeList attributes) throws InstanceNotFoundException,
111:                    ReflectionException, RemoteException {
112:                return server.setAttributes(name, attributes);
113:            }
114:
115:            /**
116:             * Invokes an operation on an MBean.
117:             * @param name - The name of the MBean
118:             * @param operationName - The name of the operation to be invoked.
119:             * @param params - An array containing the parameters to be set when the operation is invoked
120:             * @param signature - An array containing the signature of the operation.
121:             * The class objects will be loaded using the same class loader as the one
122:             * used for loading the MBean on which the operation was invoked.
123:             * @return The object returned by the operation
124:             */
125:            public Object invoke(ObjectName name,
126:                    java.lang.String operationName, java.lang.Object[] params,
127:                    java.lang.String[] signature)
128:                    throws InstanceNotFoundException, MBeanException,
129:                    ReflectionException, RemoteException {
130:                return server.invoke(name, operationName, params, signature);
131:            }
132:
133:            /**
134:             * This method discovers the attributes and operations that an MBean
135:             * exposes for management.
136:             * @param name - The name of the MBean to analyze
137:             * @return An instance of MBeanInfo allowing the retrieval of all
138:             * attributes and operations of this MBean.
139:             */
140:            public MBeanInfo getMBeanInfo(ObjectName name)
141:                    throws InstanceNotFoundException, IntrospectionException,
142:                    ReflectionException, RemoteException {
143:                return this .server.getMBeanInfo(name);
144:            }
145:
146:            /**
147:             * Adds a listener to a registered MBean.
148:             * @param name - The name of the MBean on which the listener should be added.
149:             * @param listener - The listener object which will handle the notifications emitted by the registered MBean.
150:             * @param listener - The listener object which will handle the notifications emitted by the registered MBean.
151:             * @param filter - The filter object. If filter is null, no filtering will be performed before handling notifications.
152:             * @param handback - The context to be sent to the listener when a notification is emitted.
153:             */
154:            public void addNotificationListener(ObjectName name,
155:                    NotificationListener listener, NotificationFilter filter,
156:                    Object handback) throws InstanceNotFoundException,
157:                    RemoteException {
158:                this .server.addNotificationListener(name, listener, filter,
159:                        handback);
160:            }
161:
162:            /**
163:             * Adds a listener to a registered MBean.
164:             * @param name - The name of the MBean on which the listener should be added.
165:             * @param listener - The object name of the listener which will handle the notifications emitted by the registered MBean.
166:             * @param listener - The listener object which will handle the notifications emitted by the registered MBean.
167:             * @param filter - The filter object. If filter is null, no filtering will be performed before handling notifications.
168:             * @param handback - The context to be sent to the listener when a notification is emitted.
169:             */
170:            public void addNotificationListener(ObjectName name,
171:                    ObjectName listener, NotificationFilter filter,
172:                    Object handback) throws InstanceNotFoundException,
173:                    RemoteException {
174:                this.server.addNotificationListener(name, listener, filter,
175:                        handback);
176:            }
177:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.