|
||||||||||
PREV CLASS (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.system.server.ServerConfigImpl
A container for the basic configuration elements required to create a Server instance.
MalformedURLException are rethrown as NestedRuntimeExceptions, so that code that needs to access these values does not have to directly worry about problems with lazy construction of final URL values.
Most values are determined durring first call to getter. All values when determined will have equivilent system properties set.
Clients are not meant to use this class directly. Instead use
ServerConfigLocator
(src) to get an instance of ServerConfig
(src)
and then use it to get the server's configuration bits.
Field Summary |
Constructor Summary | |
ServerConfigImpl(java.util.Properties props)
Construct a new ServerConfigImpl instance. |
Method Summary | |
boolean |
getBlockingShutdown()
Get the current value of the blocking shutdown flag. |
boolean |
getExitOnShutdown()
Get the current value of the exit on shutdown flag. |
java.io.File |
getHomeDir()
Get the local home directory which the server is running from. |
java.net.URL |
getHomeURL()
Get the home URL which the server is running from. |
java.net.URL |
getLibraryURL()
Get the home URL which the server is running from. |
java.net.URL |
getPatchURL()
Get the patch URL for the server. |
boolean |
getPlatformMBeanServer()
Get the current value of the flag that indicates if we are using the platform MBeanServer as the main jboss server. |
boolean |
getRequireJBossURLStreamHandlerFactory()
Get the current value of the requireJBossURLStreamHandlerFactory flag. |
java.lang.String |
getRootDeploymentFilename()
Get the filename of the root deployable that will be used to finalize the bootstrap process. |
java.io.File |
getServerBaseDir()
Get the base directory for calculating server home directories. |
java.net.URL |
getServerBaseURL()
Get the base directory for calculating server home URLs. |
java.net.URL |
getServerConfigURL()
Get the server configuration URL. |
java.io.File |
getServerDataDir()
Get the directory where local data will be stored. |
java.io.File |
getServerHomeDir()
Get the server home directory. |
java.net.URL |
getServerHomeURL()
Get the server home URL. |
java.net.URL |
getServerLibraryURL()
Get the server library URL. |
java.lang.String |
getServerName()
Get the name of the server. |
java.io.File |
getServerNativeDir()
Get the native dir for unpacking |
java.io.File |
getServerTempDeployDir()
Get the temporary deployment dir for unpacking |
java.io.File |
getServerTempDir()
Get the directory where temporary files will be stored. |
void |
initURLs()
Breakout the initialization of URLs from the constructor as we need the ServerConfig.HOME_DIR set for log setup, but we cannot create any file URLs prior to the |
void |
setBlockingShutdown(boolean flag)
Enable or disable blocking when Server.shutdown() is
called. |
void |
setExitOnShutdown(boolean flag)
Enable or disable exiting the JVM when Server.shutdown() is called. |
void |
setRequireJBossURLStreamHandlerFactory(boolean flag)
Set the RequireJBossURLStreamHandlerFactory flag. |
void |
setRootDeploymentFilename(java.lang.String filename)
Set the filename of the root deployable that will be used to finalize the bootstrap process. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ServerConfigImpl(java.util.Properties props) throws java.lang.Exception
props
- Configuration properties.
java.lang.Exception
- Missing or invalid configuration.Method Detail |
public void initURLs() throws java.net.MalformedURLException
java.net.MalformedURLException
public java.io.File getHomeDir()
getHomeDir
in interface ServerConfig (src)
public java.net.URL getHomeURL()
getHomeURL
in interface ServerConfig (src)
public java.net.URL getLibraryURL()
getLibraryURL
in interface ServerConfig (src)
public java.net.URL getPatchURL()
getPatchURL
in interface ServerConfig (src)
public java.lang.String getServerName()
getServerName
in interface ServerConfig (src)
public java.io.File getServerBaseDir()
getServerBaseDir
in interface ServerConfig (src)
public java.io.File getServerHomeDir()
getServerHomeDir
in interface ServerConfig (src)
public java.io.File getServerTempDir()
getServerTempDir
in interface ServerConfig (src)
public java.io.File getServerDataDir()
getServerDataDir
in interface ServerConfig (src)
public java.io.File getServerNativeDir()
getServerNativeDir
in interface ServerConfig (src)
public java.io.File getServerTempDeployDir()
getServerTempDeployDir
in interface ServerConfig (src)
public java.net.URL getServerBaseURL()
getServerBaseURL
in interface ServerConfig (src)
public java.net.URL getServerHomeURL()
getServerHomeURL
in interface ServerConfig (src)
public java.net.URL getServerLibraryURL()
getServerLibraryURL
in interface ServerConfig (src)
public java.net.URL getServerConfigURL()
getServerConfigURL
in interface ServerConfig (src)
public boolean getPlatformMBeanServer()
ServerConfig.PLATFORM_MBEANSERVER
property must be set, and the jvm must be jdk1.5+
getPlatformMBeanServer
in interface ServerConfig (src)
public void setExitOnShutdown(boolean flag)
Server.shutdown()
is called.
If enabled, then shutdown calls Server.exit(int)
. If disabled, then
only the shutdown hook will be run.
setExitOnShutdown
in interface ServerConfig (src)
flag
- True to enable calling exit on shutdown.public boolean getExitOnShutdown()
getExitOnShutdown
in interface ServerConfig (src)
public void setBlockingShutdown(boolean flag)
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.
setBlockingShutdown
in interface ServerConfig (src)
flag
- True to enable blocking shutdown.public boolean getBlockingShutdown()
getBlockingShutdown
in interface ServerConfig (src)
public void setRequireJBossURLStreamHandlerFactory(boolean flag)
setRequireJBossURLStreamHandlerFactory
in interface ServerConfig (src)
flag
- True to enable blocking shutdown.public boolean getRequireJBossURLStreamHandlerFactory()
getRequireJBossURLStreamHandlerFactory
in interface ServerConfig (src)
public void setRootDeploymentFilename(java.lang.String filename)
setRootDeploymentFilename
in interface ServerConfig (src)
filename
- The filename of the root deployable.public java.lang.String getRootDeploymentFilename()
getRootDeploymentFilename
in interface ServerConfig (src)
|
||||||||||
PREV CLASS (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |