J2eeMbeanItem.java

00001 /*
00002  * JOnAS: Java(TM) Open Application Server
00003  * Copyright (C) 1999 Bull S.A.
00004  * Contact: jonas-team@objectweb.org
00005  *
00006  * This library is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU Lesser General Public
00008  * License as published by the Free Software Foundation; either
00009  * version 2.1 of the License, or any later version.
00010  *
00011  * This library is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014  * Lesser General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU Lesser General Public
00017  * License along with this library; if not, write to the Free Software
00018  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
00019  * USA
00020  *
00021  * --------------------------------------------------------------------------
00022  * $Id: J2eeMbeanItem.java,v 1.1 2003/11/20 17:06:41 antonma Exp $
00023  * --------------------------------------------------------------------------
00024  */
00025 
00026 package org.objectweb.jonas.webapp.jonasadmin.mbean;
00027 
00028 import javax.management.ObjectName;
00029 
00033 public class J2eeMbeanItem extends MbeanItem {
00034 
00035 // --------------------------------------------------------- Constants
00036 
00037     public static final String KEY_TYPE = "j2eeType";
00038     public static final String KEY_SERVER = "J2EEServer";
00039     public static final String KEY_APPLICATION = "J2EEApplication";
00040     public static final String KEY_NAME = "name";
00041 
00042     public static final String NONE = "none";
00043 
00044 
00045 // --------------------------------------------------------- Properties Variables
00046 
00047     private String j2eeType = null;
00048     private String j2eeServer = null;
00049     private String j2eeApplication = null;
00050 
00051 // --------------------------------------------------------- Constructors
00052 
00053     public J2eeMbeanItem() {
00054         super();
00055     }
00056 
00057     public J2eeMbeanItem(ObjectName p_ObjectName) {
00058         super(p_ObjectName);
00059         setJ2eeType(p_ObjectName.getKeyProperty(KEY_TYPE));
00060         setJ2eeServer(p_ObjectName.getKeyProperty(KEY_SERVER));
00061         setJ2eeApplication(p_ObjectName.getKeyProperty(KEY_APPLICATION));
00062         setName(p_ObjectName.getKeyProperty(KEY_NAME));
00063     }
00064 
00065 // --------------------------------------------------------- Protected Methods
00066 
00067     protected void initialize() {
00068         setFamily(FAMILY_J2EE);
00069     }
00070 
00071 // --------------------------------------------------------- Properties Methods
00072 
00073     public String getJ2eeType() {
00074         return j2eeType;
00075     }
00076 
00077     public void setJ2eeType(String j2eeType) {
00078         this.j2eeType = j2eeType;
00079     }
00080 
00081     public String getJ2eeServer() {
00082         return j2eeServer;
00083     }
00084 
00085     public void setJ2eeServer(String j2eeServer) {
00086         this.j2eeServer = j2eeServer;
00087     }
00088 
00089     public String getJ2eeApplication() {
00090         return j2eeApplication;
00091     }
00092 
00093     public void setJ2eeApplication(String j2eeApplication) {
00094         this.j2eeApplication = j2eeApplication;
00095     }
00096 }

Generated on Tue Feb 15 15:05:28 2005 for JOnAS by  doxygen 1.3.9.1