KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > system > server > ServerConfigImplMBean


1 /*
2 * JBoss, Home of Professional Open Source
3 * Copyright 2005, JBoss Inc., and individual contributors as indicated
4 * by the @authors tag. See the copyright.txt in the distribution for a
5 * full listing of individual contributors.
6 *
7 * This is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU Lesser General Public License as
9 * published by the Free Software Foundation; either version 2.1 of
10 * the License, or (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this software; if not, write to the Free
19 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
21 */

22 package org.jboss.system.server;
23
24 import java.io.File JavaDoc;
25 import java.net.URL JavaDoc;
26
27 import javax.management.ObjectName JavaDoc;
28
29 import org.jboss.mx.util.ObjectNameFactory;
30
31 /**
32  * MBean interface.
33  */

34 public interface ServerConfigImplMBean
35 {
36    /** Default ObjectName */
37    static final ObjectName JavaDoc OBJECT_NAME =
38       ObjectNameFactory.create("jboss.system:type=ServerConfig");
39
40    /**
41     * Get the local home directory which the server is running from.
42     */

43    File JavaDoc getHomeDir();
44
45    /**
46     * Get the home URL which the server is running from.
47     */

48    URL JavaDoc getHomeURL();
49
50    /**
51     * Get the home URL which the server is running from.
52     */

53    URL JavaDoc getLibraryURL();
54
55    /**
56     * Get the patch URL for the server.
57     */

58    URL JavaDoc getPatchURL();
59
60    /**
61     * Get the name of the server.
62     */

63    String JavaDoc getServerName();
64
65    /**
66     * Get the base directory for calculating server home directories.
67     */

68    File JavaDoc getServerBaseDir();
69
70    /**
71     * Get the server home directory.
72     */

73    File JavaDoc getServerHomeDir();
74
75    /**
76     * Get the directory where log files will be stored.
77     * @return the writable log directory
78     */

79    java.io.File JavaDoc getServerLogDir();
80
81    /**
82     * Get the directory where temporary files will be stored.
83     */

84    File JavaDoc getServerTempDir();
85
86    /**
87     * Get the directory where local data will be stored.
88     */

89    File JavaDoc getServerDataDir();
90
91    /**
92     * Get the base directory for calculating server home URLs.
93     */

94    URL JavaDoc getServerBaseURL();
95
96    /**
97     * Get the server home URL.
98     */

99    URL JavaDoc getServerHomeURL();
100
101    /**
102     * Get the server library URL.
103     */

104    URL JavaDoc getServerLibraryURL();
105
106    /**
107     * Get the server configuration URL.
108     */

109    URL JavaDoc getServerConfigURL();
110   
111    /**
112     * Get the current value of the flag that indicates if we are
113     * using the platform MBeanServer as the main jboss server.
114     * Both the {@link ServerConfig.PLATFORM_MBEANSERVER}
115     * property must be set, and the jvm must be jdk1.5+
116     */

117    boolean getPlatformMBeanServer();
118
119    /**
120     * Enable or disable exiting the JVM when {@link Server#shutdown}
121     * is called. If enabled, then shutdown calls {@link Server#exit}.
122     * If disabled, then only the shutdown hook will be run.
123     * @param flag True to enable calling exit on shutdown.
124     */

125    void setExitOnShutdown(boolean flag);
126
127    /**
128     * Get the current value of the exit on shutdown flag.
129     * @return The current value of the exit on shutdown flag.
130     */

131    boolean getExitOnShutdown();
132
133    /**
134     * Enable or disable blocking when {@link Server#shutdown} is called.
135     * If enabled, then shutdown will be called in the current thread.
136     * If disabled, then the shutdown hook will be run ansynchronously
137     * in a separate thread.
138     * @param flag True to enable blocking shutdown.
139     */

140    void setBlockingShutdown(boolean flag);
141
142    /**
143     * Get the current value of the blocking shutdown flag.
144     * @return The current value of the blocking shutdown flag.
145     */

146    boolean getBlockingShutdown();
147
148    /**
149     * Set the RequireJBossURLStreamHandlerFactory flag. if false,
150     * exceptions when setting the URLStreamHandlerFactory will
151     * be logged and ignored.
152     * @param flag True to enable blocking shutdown.
153     */

154    void setRequireJBossURLStreamHandlerFactory(boolean flag);
155
156    /**
157     * Get the current value of the requireJBossURLStreamHandlerFactory flag.
158     * @return The current value of the requireJBossURLStreamHandlerFactory flag.
159     */

160    boolean getRequireJBossURLStreamHandlerFactory();
161   
162    /**
163     * Set the filename of the root deployable that will be used to
164     * finalize the bootstrap process.
165     * @param filename The filename of the root deployable.
166     */

167    void setRootDeploymentFilename(String JavaDoc filename);
168
169    /**
170     * Get the filename of the root deployable that will be used to
171     * finalize the bootstrap process.
172     * @return The filename of the root deployable.
173     */

174    String JavaDoc getRootDeploymentFilename();
175
176    /**
177     * Get the native dir for unpacking
178     *
179     * @return the directory
180     */

181   File JavaDoc getServerNativeDir() ;
182
183    /**
184     * Get the temporary deployment dir for unpacking
185     *
186     * @return the directory
187     */

188   File JavaDoc getServerTempDeployDir() ;
189
190 }
191
Popular Tags