001: /*
002: * JBoss, Home of Professional Open Source.
003: * Copyright 2006, Red Hat Middleware LLC, and individual contributors
004: * as indicated by the @author tags. See the copyright.txt file in the
005: * distribution for a full listing of individual contributors.
006: *
007: * This is free software; you can redistribute it and/or modify it
008: * under the terms of the GNU Lesser General Public License as
009: * published by the Free Software Foundation; either version 2.1 of
010: * the License, or (at your option) any later version.
011: *
012: * This software is distributed in the hope that it will be useful,
013: * but WITHOUT ANY WARRANTY; without even the implied warranty of
014: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015: * Lesser General Public License for more details.
016: *
017: * You should have received a copy of the GNU Lesser General Public
018: * License along with this software; if not, write to the Free
019: * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
020: * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
021: */
022: package org.jboss.system.server;
023:
024: import javax.management.ObjectName;
025:
026: import org.jboss.mx.util.ObjectNameFactory;
027:
028: /**
029: * MBean interface.
030: */
031: public interface ServerConfigImplMBean {
032: /** The default ObjectName */
033: ObjectName OBJECT_NAME = ObjectNameFactory
034: .create("jboss.system:type=ServerConfig");
035:
036: /**
037: * Get the server Specification-Version
038: */
039: String getSpecificationVersion();
040:
041: /**
042: * Get the local home directory which the server is running from.
043: */
044: java.io.File getHomeDir();
045:
046: /**
047: * Get the home URL which the server is running from.
048: */
049: java.net.URL getHomeURL();
050:
051: /**
052: * Get the home URL which the server is running from.
053: */
054: java.net.URL getLibraryURL();
055:
056: /**
057: * Get the patch URL for the server.
058: */
059: java.net.URL getPatchURL();
060:
061: /**
062: * Get the name of the server.
063: */
064: java.lang.String getServerName();
065:
066: /**
067: * Get the base directory for calculating server home directories.
068: */
069: java.io.File getServerBaseDir();
070:
071: /**
072: * Get the server home directory.
073: */
074: java.io.File getServerHomeDir();
075:
076: /**
077: * Get the directory where log files will be stored.
078: * @return the writable log directory
079: */
080: java.io.File getServerLogDir();
081:
082: /**
083: * Get the directory where temporary files will be stored.
084: * @return the writable temp directory
085: */
086: java.io.File getServerTempDir();
087:
088: /**
089: * Get the directory where local data will be stored.
090: * @return the data directory */
091: java.io.File getServerDataDir();
092:
093: /**
094: * Get the native dir for unpacking
095: * @return the directory */
096: java.io.File getServerNativeDir();
097:
098: /**
099: * Get the temporary deployment dir for unpacking
100: * @return the directory */
101: java.io.File getServerTempDeployDir();
102:
103: /**
104: * Get the base directory for calculating server home URLs.
105: */
106: java.net.URL getServerBaseURL();
107:
108: /**
109: * Get the server home URL.
110: */
111: java.net.URL getServerHomeURL();
112:
113: /**
114: * Get the server library URL.
115: */
116: java.net.URL getServerLibraryURL();
117:
118: /**
119: * Get the server configuration URL.
120: */
121: java.net.URL getServerConfigURL();
122:
123: /**
124: * Get the current value of the flag that indicates if we are using the platform MBeanServer as the main jboss server. Both the {@link ServerConfig.PLATFORM_MBEANSERVER} property must be set, and the jvm must be jdk1.5+
125: * @return true if jboss runs on the jvm platfrom MBeanServer
126: */
127: boolean getPlatformMBeanServer();
128:
129: /**
130: * Enable or disable exiting the JVM when {@link Server#shutdown} is called. If enabled, then shutdown calls {@link Server#exit}. If disabled, then only the shutdown hook will be run.
131: * @param flag True to enable calling exit on shutdown.
132: */
133: void setExitOnShutdown(boolean flag);
134:
135: /**
136: * Get the current value of the exit on shutdown flag.
137: * @return The current value of the exit on shutdown flag.
138: */
139: boolean getExitOnShutdown();
140:
141: /**
142: * Enable or disable blocking when {@link Server#shutdown} is called. If enabled, then shutdown will be called in the current thread. If disabled, then the shutdown hook will be run ansynchronously in a separate thread.
143: * @param flag True to enable blocking shutdown.
144: */
145: void setBlockingShutdown(boolean flag);
146:
147: /**
148: * Get the current value of the blocking shutdown flag.
149: * @return The current value of the blocking shutdown flag.
150: */
151: boolean getBlockingShutdown();
152:
153: /**
154: * Set the RequireJBossURLStreamHandlerFactory flag. if false, exceptions when setting the URLStreamHandlerFactory will be logged and ignored.
155: * @param flag True to enable blocking shutdown.
156: */
157: void setRequireJBossURLStreamHandlerFactory(boolean flag);
158:
159: /**
160: * Get the current value of the requireJBossURLStreamHandlerFactory flag.
161: * @return The current value of the requireJBossURLStreamHandlerFactory flag.
162: */
163: boolean getRequireJBossURLStreamHandlerFactory();
164:
165: /**
166: * Set the filename of the root deployable that will be used to finalize the bootstrap process.
167: * @param filename The filename of the root deployable.
168: */
169: void setRootDeploymentFilename(java.lang.String filename);
170:
171: /**
172: * Get the filename of the root deployable that will be used to finalize the bootstrap process.
173: * @return The filename of the root deployable.
174: */
175: java.lang.String getRootDeploymentFilename();
176:
177: }
|