01: /*
02: * JOnAS: Java(TM) Open Application Server
03: * Copyright (C) 1999 Bull S.A.
04: * Contact: jonas-team@objectweb.org
05: *
06: * This library is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU Lesser General Public
08: * License as published by the Free Software Foundation; either
09: * version 2.1 of the License, or any later version.
10: *
11: * This library is distributed in the hope that it will be useful,
12: * but WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14: * Lesser General Public License for more details.
15: *
16: * You should have received a copy of the GNU Lesser General Public
17: * License along with this library; if not, write to the Free Software
18: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
19: * USA
20: *
21: * --------------------------------------------------------------------------
22: * $Id: J2eeMbeanItem.java 3734 2003-11-20 17:06:41Z antonma $
23: * --------------------------------------------------------------------------
24: */
25:
26: package org.objectweb.jonas.webapp.jonasadmin.mbean;
27:
28: import javax.management.ObjectName;
29:
30: /**
31: * @author Michel-Ange ANTON
32: */
33: public class J2eeMbeanItem extends MbeanItem {
34:
35: // --------------------------------------------------------- Constants
36:
37: public static final String KEY_TYPE = "j2eeType";
38: public static final String KEY_SERVER = "J2EEServer";
39: public static final String KEY_APPLICATION = "J2EEApplication";
40: public static final String KEY_NAME = "name";
41:
42: public static final String NONE = "none";
43:
44: // --------------------------------------------------------- Properties Variables
45:
46: private String j2eeType = null;
47: private String j2eeServer = null;
48: private String j2eeApplication = null;
49:
50: // --------------------------------------------------------- Constructors
51:
52: public J2eeMbeanItem() {
53: super ();
54: }
55:
56: public J2eeMbeanItem(ObjectName p_ObjectName) {
57: super (p_ObjectName);
58: setJ2eeType(p_ObjectName.getKeyProperty(KEY_TYPE));
59: setJ2eeServer(p_ObjectName.getKeyProperty(KEY_SERVER));
60: setJ2eeApplication(p_ObjectName.getKeyProperty(KEY_APPLICATION));
61: setName(p_ObjectName.getKeyProperty(KEY_NAME));
62: }
63:
64: // --------------------------------------------------------- Protected Methods
65:
66: protected void initialize() {
67: setFamily(FAMILY_J2EE);
68: }
69:
70: // --------------------------------------------------------- Properties Methods
71:
72: public String getJ2eeType() {
73: return j2eeType;
74: }
75:
76: public void setJ2eeType(String j2eeType) {
77: this .j2eeType = j2eeType;
78: }
79:
80: public String getJ2eeServer() {
81: return j2eeServer;
82: }
83:
84: public void setJ2eeServer(String j2eeServer) {
85: this .j2eeServer = j2eeServer;
86: }
87:
88: public String getJ2eeApplication() {
89: return j2eeApplication;
90: }
91:
92: public void setJ2eeApplication(String j2eeApplication) {
93: this.j2eeApplication = j2eeApplication;
94: }
95: }
|