KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > admin > server > core > mbean > config > ManagedJ2EEServlet


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23
24 package com.sun.enterprise.admin.server.core.mbean.config;
25
26 /**
27     Represents a manageable J2EE servlet. Servlet will expose some manageable
28     attributes defined by its descriptor and they will be made available.
29     For every Servlet that is loaded by a running Server Instance, there will
30     be a correponding MBean registered in the MBeanServer. Note that the life
31     cycle of Servlet is not manageable by this interface, because it is
32     not exposed by its descriptor.
33     <p>
34     The Servlet can be running as a part of deployed application or an
35     independently deployed module. In case the servlet is loaded from an
36     independently deployed module, the application name (in the ObjectName)
37     is treated as default application name or null.
38     <p>
39     Object Name of this MBean is:
40         ias:type=J2EEServlet, AppName=<appName>, ModuleName=<modName>,
41         ServletName=<servletName>
42 */

43 public class ManagedJ2EEServlet extends AdminBase
44 {
45     /** Every resource MBean should override this method to execute specific
46      * operations on the MBean. This method is enhanced in 8.0. It was a no-op
47      * in 7.0. In 8.0, it is modified to invoke the actual method through
48      * reflection.
49      * @since 8.0
50      * @see javax.management.MBeanServer#invoke
51      * @see #getImplementingClass
52      */

53     protected Class JavaDoc getImplementingClass() {
54         return ( this.getClass() );
55     }
56     
57     /** Reflection requires the implementing object. */
58     protected Object JavaDoc getImplementingMBean() {
59         return ( this );
60     }
61 }
62
Popular Tags