public class BaseServerConfig extends Object implements ServerConfig
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.
| Modifier and Type | Class and Description |
|---|---|
static class |
BaseServerConfig.FileMetaMapper
TODO: move to managed project, JBMAN-49
|
BLOCKING_SHUTDOWN, BOOT_LIBRARY_LIST, BOOTSTRAP_URL, COMMON_BASE_URL, COMMON_BASE_URL_SUFFIX, COMMON_LIBRARY_URL, DEFAULT_BLOCKING_SHUTDOWN, DEFAULT_EXIT_ON_SHUTDOWN, DEFAULT_INSTALL_LIFE_THREAD, DEFAULT_PARITION_NAME, DEFAULT_PLATFORM_MBEANSERVER, DEFAULT_REQUIRE_JBOSS_URL_STREAM_HANDLER_FACTORY, DEFAULT_ROOT_DEPLOYMENT_FILENAME, DEFAULT_SERVER_NAME, EXIT_ON_SHUTDOWN, HOME_DIR, HOME_URL, INSTALL_LIFE_THREAD, LIBRARY_URL, LIBRARY_URL_SUFFIX, NATIVE_DIR_PROPERTY, NATIVE_LOAD_PROPERTY, PARTITION_NAME_PROPERTY, PARTITION_UDP_PORT_PROPERTY, PARTITION_UDP_PROPERTY, PATCH_URL, PLATFORM_MBEANSERVER, REQUIRE_JBOSS_URL_STREAM_HANDLER_FACTORY, ROOT_DEPLOYMENT_FILENAME, SERVER_BASE_DIR, SERVER_BASE_DIR_SUFFIX, SERVER_BASE_URL, SERVER_BASE_URL_SUFFIX, SERVER_BIND_ADDRESS, SERVER_CONFIG_URL, SERVER_CONFIG_URL_SUFFIX, SERVER_DATA_DIR, SERVER_DATA_DIR_SUFFIX, SERVER_HOME_DIR, SERVER_HOME_URL, SERVER_LIBRARY_URL, SERVER_LOG_DIR, SERVER_LOG_DIR_SUFFIX, SERVER_NAME, SERVER_TEMP_DIR, SERVER_TEMP_DIR_SUFFIX, SERVER_TYPE| Constructor and Description |
|---|
BaseServerConfig(Properties props)
Construct a new ServerConfigImpl instance.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
getBlockingShutdown()
Get the current value of the blocking shutdown flag.
|
URL |
getBootstrapURL()
Get the bootstrap url
|
URL |
getCommonBaseURL()
Get the common base URL.
|
URL |
getCommonLibraryURL()
Get the common library URL.
|
boolean |
getExitOnShutdown()
Get the current value of the exit on shutdown flag.
|
File |
getHomeDir()
Get the local home directory which the server is running from.
|
URL |
getHomeURL()
Get the home URL which the server is running from.
|
URL |
getLibraryURL()
Get the library URL for the server.
|
String |
getPartitionName()
Obtains the clustering partition name
|
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.
|
String |
getRootDeploymentFilename()
Get the filename of the root deployable that will be used to finalize
the bootstrap process.
|
File |
getServerBaseDir()
Get the base directory for calculating server home directories.
|
URL |
getServerBaseURL()
Get the base directory for calculating server home URLs.
|
URL |
getServerConfigURL()
Get the server configuration URL.
|
File |
getServerDataDir()
Get the directory where local data will be stored.
|
File |
getServerHomeDir()
Get the server home directory.
|
URL |
getServerHomeURL()
Get the server home URL.
|
URL |
getServerLibraryURL()
Get the server library URL.
|
File |
getServerLogDir()
Get the directory where temporary files will be stored.
|
String |
getServerName()
Get the name of the server.
|
File |
getServerNativeDir()
Get the native dir for unpacking
|
File |
getServerTempDeployDir()
Get the temporary deployment dir for unpacking
|
File |
getServerTempDir()
Get the directory where temporary files will be stored.
|
String |
getSpecificationVersion()
Get the server Specification-Version
|
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
|
boolean |
isInstallLifeThread()
Whether to install the lifethread
|
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 |
setInstallLifeThread(boolean flag) |
void |
setRequireJBossURLStreamHandlerFactory(boolean flag)
Set the RequireJBossURLStreamHandlerFactory flag.
|
void |
setRootDeploymentFilename(String filename)
Set the filename of the root deployable that will be used to finalize
the bootstrap process.
|
public BaseServerConfig(Properties props) throws Exception
props - Configuration properties.Exception - Missing or invalid configuration.public void initURLs()
throws MalformedURLException
MalformedURLException - for a bad home urlpublic URL getBootstrapURL()
ServerConfiggetBootstrapURL in interface ServerConfigpublic File getHomeDir()
ServerConfiggetHomeDir in interface ServerConfigpublic URL getHomeURL()
ServerConfiggetHomeURL in interface ServerConfigpublic URL getLibraryURL()
ServerConfiggetLibraryURL in interface ServerConfigpublic String getPartitionName()
public URL getPatchURL()
ServerConfiggetPatchURL in interface ServerConfigpublic String getServerName()
ServerConfiggetServerName in interface ServerConfigpublic File getServerBaseDir()
ServerConfiggetServerBaseDir in interface ServerConfigpublic File getServerHomeDir()
ServerConfiggetServerHomeDir in interface ServerConfigpublic File getServerLogDir()
getServerLogDir in interface ServerConfigServerConfig.SERVER_LOG_DIRpublic File getServerTempDir()
getServerTempDir in interface ServerConfigpublic File getServerDataDir()
getServerDataDir in interface ServerConfigpublic File getServerNativeDir()
getServerNativeDir in interface ServerConfigpublic File getServerTempDeployDir()
getServerTempDeployDir in interface ServerConfigpublic URL getServerBaseURL()
ServerConfiggetServerBaseURL in interface ServerConfigpublic URL getServerHomeURL()
ServerConfiggetServerHomeURL in interface ServerConfigpublic URL getServerLibraryURL()
ServerConfiggetServerLibraryURL in interface ServerConfigpublic URL getCommonBaseURL()
ServerConfiggetCommonBaseURL in interface ServerConfigpublic URL getCommonLibraryURL()
ServerConfiggetCommonLibraryURL in interface ServerConfigpublic URL getServerConfigURL()
ServerConfiggetServerConfigURL in interface ServerConfigpublic boolean getPlatformMBeanServer()
ServerConfig.PLATFORM_MBEANSERVER
property must be set, and the jvm must be jdk1.5+getPlatformMBeanServer in interface ServerConfigpublic void setExitOnShutdown(boolean flag)
Server.shutdown() is called.
If enabled, then shutdown calls Server#exit(). If disabled, then
only the shutdown hook will be run.setExitOnShutdown in interface ServerConfigflag - True to enable calling exit on shutdown.public boolean getExitOnShutdown()
getExitOnShutdown in interface ServerConfigpublic void setInstallLifeThread(boolean flag)
public boolean isInstallLifeThread()
ServerConfigisInstallLifeThread in interface ServerConfigpublic 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 ServerConfigflag - True to enable blocking shutdown.public boolean getBlockingShutdown()
getBlockingShutdown in interface ServerConfigpublic void setRequireJBossURLStreamHandlerFactory(boolean flag)
setRequireJBossURLStreamHandlerFactory in interface ServerConfigflag - True to enable blocking shutdown.public boolean getRequireJBossURLStreamHandlerFactory()
getRequireJBossURLStreamHandlerFactory in interface ServerConfigpublic void setRootDeploymentFilename(String filename)
setRootDeploymentFilename in interface ServerConfigfilename - The filename of the root deployable.public String getRootDeploymentFilename()
getRootDeploymentFilename in interface ServerConfigpublic String getSpecificationVersion()
ServerConfiggetSpecificationVersion in interface ServerConfigCopyright © 2012 JBoss by Red Hat. All Rights Reserved.