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: JettyObjectName.java 9967 2007-01-29 14:57:49Z danesa $
23: * --------------------------------------------------------------------------
24: */package org.objectweb.jonas.webapp.jonasadmin;
25:
26: import javax.management.ObjectName;
27:
28: /**
29: * A set of static classes used to build the names of Jetty MBeans used in JOnAS.
30: *
31: * @author Michel-Ange ANTON
32: */
33: public class JettyObjectName {
34:
35: public static ObjectName jettyServer(String pDomain) {
36: try {
37: return new ObjectName(pDomain
38: + ":type=webContainer,name=Jetty");
39: } catch (javax.management.MalformedObjectNameException e) {
40: // this should never occur
41: return null;
42: }
43: }
44:
45: public static ObjectName jettyContexts(String pDomain) {
46: try {
47: return new ObjectName(pDomain
48: + ":type=webContainer,name=Jetty,*");
49: } catch (javax.management.MalformedObjectNameException e) {
50: // this should never occur
51: return null;
52: }
53: }
54:
55: public static ObjectName jettyContexts(String pDomain, String p_Path) {
56: try {
57: return new ObjectName(pDomain
58: + ":type=webContainer,name=Jetty,context=" + p_Path
59: + ",*");
60: } catch (javax.management.MalformedObjectNameException e) {
61: // this should never occur
62: return null;
63: }
64: }
65: }
|