public class ServerEnvironment extends ProcessEnvironment implements Serializable
Modifier and Type | Class and Description |
---|---|
static class |
ServerEnvironment.LaunchType
The manner in which a server can be launched
|
Modifier and Type | Field and Description |
---|---|
static String |
BOOTSTRAP_MAX_THREADS
Constant that holds the name of the system property for specifying the max threads used by the bootstrap ServiceContainer.
|
static String |
BUNDLES_DIR
Constant that holds the name of the system property for specifying
the bundles directory . |
static String |
CONTROLLER_TEMP_DIR
Common alias between domain and standalone mode.
|
protected static String |
DOMAIN_BASE_DIR |
protected static String |
DOMAIN_CONFIG_DIR |
static String |
HOME_DIR
Constant that holds the name of the system property for specifying
the JBoss home directory . |
static String |
HOST_NAME
Constant that holds the name of the system property for specifying the local part of the name
of the host machine that this server is running on.
|
static String |
JAVA_EXT_DIRS
Constant that holds the name of the system property for specifying the JDK extension directory paths.
|
static String |
JBOSS_BIND_ADDRESS
The default system property used to store bind address information from the command-line (-b).
|
static String |
JBOSS_BIND_ADDRESS_PREFIX
Prefix for the system property used to store qualified bind address information from the command-line (-bxxx).
|
static String |
JBOSS_DEFAULT_MULTICAST_ADDRESS
The default system property used to store bind address information from the command-line (-b).
|
static String |
JBOSS_PERSIST_SERVER_CONFIG
Deprecated.
for internal us only, may change or be removed at any time without notice
|
static String |
JBOSS_SERVER_DEFAULT_CONFIG
The system property used to store the name of the default server configuration file.
|
static String |
JBOSS_SERVER_MANAGEMENT_UUID
The system property used to set the unique identifier for this server exposed via the
uuid attribute of the server's root management resource. |
static String |
MODULES_DIR
Deprecated.
has no useful meaning
|
static String |
NODE_NAME
Constant that holds the name of the system property for specifying the node name within a cluster.
|
static String |
QUALIFIED_HOST_NAME
Constant that holds the name of the system property for specifying the fully-qualified name of the host
machine that this server is running on.
|
static String |
SERVER_BASE_DIR
Constant that holds the name of the system property for specifying
the server base directory . |
static String |
SERVER_CONFIG_DIR
Constant that holds the name of the system property for specifying
getServerConfigurationDir() () the server configuration directory}. |
static String |
SERVER_CONTENT_DIR
Constant that holds the name of the system property for specifying
the server managed content repository directory . |
static String |
SERVER_DATA_DIR
Constant that holds the name of the system property for specifying
getServerDataDir() () the server data directory}. |
static String |
SERVER_DEPLOY_DIR
Deprecated.
|
static String |
SERVER_LOG_DIR
Constant that holds the name of the system property for specifying
the server log directory . |
static String |
SERVER_NAME
Constant that holds the name of the system property for specifying the name of this server instance.
|
static String |
SERVER_TEMP_DIR
Constant that holds the name of the system property for specifying t
the server temp directory . |
static String |
VFS_MODULE_IDENTIFIER
VFS module identifier.
|
JBOSS_DOMAIN_UUID, KERNEL_DIR, NAME, UUID_FILE
Constructor and Description |
---|
ServerEnvironment(String hostControllerName,
Properties props,
Map<String,String> env,
String serverConfig,
ConfigurationFile.InteractionPolicy configInteractionPolicy,
ServerEnvironment.LaunchType launchType,
RunningMode initialRunningMode,
ProductConfig productConfig) |
ServerEnvironment(String hostControllerName,
Properties props,
Map<String,String> env,
String serverConfig,
ConfigurationFile.InteractionPolicy configInteractionPolicy,
ServerEnvironment.LaunchType launchType,
RunningMode initialRunningMode,
ProductConfig productConfig,
boolean startSuspended) |
ServerEnvironment(String hostControllerName,
Properties props,
Map<String,String> env,
String serverConfig,
ConfigurationFile.InteractionPolicy configInteractionPolicy,
ServerEnvironment.LaunchType launchType,
RunningMode initialRunningMode,
ProductConfig productConfig,
long startTime) |
ServerEnvironment(String hostControllerName,
Properties props,
Map<String,String> env,
String serverConfig,
ConfigurationFile.InteractionPolicy configInteractionPolicy,
ServerEnvironment.LaunchType launchType,
RunningMode initialRunningMode,
ProductConfig productConfig,
long startTime,
boolean startSuspended) |
Modifier and Type | Method and Description |
---|---|
static int |
getBootstrapMaxThreads()
Determine the number of threads to use for the bootstrap service container.
|
File |
getBundlesDir()
Gets the directory under which OSGi bundles should be located.
|
File |
getDomainBaseDir()
Gets the base directory in which managed domain files are stored.
|
File |
getDomainConfigurationDir()
Gets the directory in which managed domain configuration files are stored.
|
File |
getHomeDir()
Gets the root directory for this JBoss installation.
|
String |
getHostControllerName()
Get the name of this server's host controller.
|
String |
getHostName()
Get the local host name detected at server startup.
|
RunningMode |
getInitialRunningMode()
Gets the
RunningMode that was in effect when this server was launched. |
UUID |
getInstanceUuid() |
File[] |
getJavaExtDirs()
Gets any Java extension directories.
|
ServerEnvironment.LaunchType |
getLaunchType()
Gets the manner in which this server was launched
|
File |
getModulesDir()
Deprecated.
has no reliable meaning
|
String |
getNodeName()
Get the node name used for clustering purposes.
|
protected String |
getProcessName() |
ProductConfig |
getProductConfig()
Gets the
ProductConfig detected at startup. |
String |
getQualifiedHostName()
Get the fully-qualified host name detected at server startup.
|
RunningModeControl |
getRunningModeControl()
Get the
RunningModeControl containing the current running mode of the server |
File |
getServerBaseDir()
Gets the based directory for this server.
|
File |
getServerConfigurationDir()
Gets the directory in which server configuration files are stored.
|
ConfigurationFile |
getServerConfigurationFile()
Gets the
ConfigurationFile that manages the server's configuration file. |
File |
getServerContentDir()
Gets the directory in which the server will store server-managed user content (e.g.
|
File |
getServerDataDir()
Gets the directory in which the server can store private internal state that
should survive a process restart.
|
File |
getServerDeployDir()
Deprecated.
|
File |
getServerLogDir()
Gets the directory in which the server can write log files.
|
String |
getServerName()
Get the name of this server instance.
|
File |
getServerTempDir()
Gets the directory in which athe server can store private internal state that
does not need to survive a process restart.
|
long |
getStartTime()
Gets the time when this process was started.
|
protected boolean |
isRuntimeSystemPropertyUpdateAllowed(String propertyName,
String propertyValue,
boolean bootTime) |
boolean |
isSelfContained()
Gets whether this server is a self-contained (no filesystem layout) or not.
|
boolean |
isStandalone()
Gets whether this server is an independently managed server, not managed as part of a managed domain.
|
boolean |
isStartSuspended()
If this is true then the server will start in suspended mode
|
protected void |
setProcessName(String processName) |
protected void |
systemPropertyUpdated(String propertyName,
String propertyValue) |
getProcessNameReadHandler, getProcessNameWriteHandler, obtainProcessUUID, resolveGUID
public static final String JAVA_EXT_DIRS
public static final String HOME_DIR
the JBoss home directory
.@Deprecated public static final String MODULES_DIR
getModulesDir()
.
Defaults to HOME_DIR/modules/
This system property has no real meaning and should not be regarded as providing any sort of useful information. The "modules" directory is the default location from which JBoss Modules looks to find modules. However, this behavior is in no way controlled by this system property, nor is it guaranteed that modules will be loaded from only one directory, nor is it guaranteed that the "modules" directory will be one of the directories used. Finally, the structure and contents of any directories from which JBoss Modules loads resources is not something available from this class. Users wishing to interact with the modular classloading system should use the APIs provided by JBoss Modulespublic static final String BUNDLES_DIR
the bundles directory
.
Defaults to HOME_DIR/bundles/
public static final String VFS_MODULE_IDENTIFIER
public static final String SERVER_BASE_DIR
the server base directory
.
Defaults to HOME_DIR/standalone.
public static final String SERVER_CONFIG_DIR
getServerConfigurationDir()
() the server configuration directory}.
Defaults to SERVER_BASE_DIR/configuration .
public static final String SERVER_DATA_DIR
getServerDataDir()
() the server data directory}.
Defaults to SERVER_BASE_DIR/data.
public static final String SERVER_CONTENT_DIR
the server managed content repository directory
.
Defaults to SERVER_DATA_DIR/content.
@Deprecated public static final String SERVER_DEPLOY_DIR
SERVER_CONTENT_DIR
SERVER_CONTENT_DIR
.public static final String SERVER_LOG_DIR
the server log directory
.
Defaults to SERVER_BASE_DIR/log.
public static final String SERVER_TEMP_DIR
the server temp directory
.
Defaults to SERVER_BASE_DIR/tmp .
public static final String CONTROLLER_TEMP_DIR
public static final String NODE_NAME
public static final String SERVER_NAME
public static final String HOST_NAME
public static final String QUALIFIED_HOST_NAME
public static final String BOOTSTRAP_MAX_THREADS
public static final String JBOSS_BIND_ADDRESS
public static final String JBOSS_BIND_ADDRESS_PREFIX
public static final String JBOSS_DEFAULT_MULTICAST_ADDRESS
public static final String JBOSS_SERVER_DEFAULT_CONFIG
-c
or --server-config
command line switches
to explicitly set the server configuration file.public static final String JBOSS_SERVER_MANAGEMENT_UUID
uuid
attribute of the server's root management resource. If the property is not
set any previously persisted UUID will be used; otherwise a random UUID will be generated.@Deprecated public static final String JBOSS_PERSIST_SERVER_CONFIG
protected static final String DOMAIN_BASE_DIR
protected static final String DOMAIN_CONFIG_DIR
public ServerEnvironment(String hostControllerName, Properties props, Map<String,String> env, String serverConfig, ConfigurationFile.InteractionPolicy configInteractionPolicy, ServerEnvironment.LaunchType launchType, RunningMode initialRunningMode, ProductConfig productConfig, boolean startSuspended)
public ServerEnvironment(String hostControllerName, Properties props, Map<String,String> env, String serverConfig, ConfigurationFile.InteractionPolicy configInteractionPolicy, ServerEnvironment.LaunchType launchType, RunningMode initialRunningMode, ProductConfig productConfig)
public ServerEnvironment(String hostControllerName, Properties props, Map<String,String> env, String serverConfig, ConfigurationFile.InteractionPolicy configInteractionPolicy, ServerEnvironment.LaunchType launchType, RunningMode initialRunningMode, ProductConfig productConfig, long startTime)
public ServerEnvironment(String hostControllerName, Properties props, Map<String,String> env, String serverConfig, ConfigurationFile.InteractionPolicy configInteractionPolicy, ServerEnvironment.LaunchType launchType, RunningMode initialRunningMode, ProductConfig productConfig, long startTime, boolean startSuspended)
public String getHostControllerName()
null
.getHostControllerName
in class ProcessEnvironment
null
if running in standalone
modepublic String getServerName()
system property
, or auto-detected based on getHostName()
host name}.public String getQualifiedHostName()
getQualifiedHostName
in class ProcessEnvironment
public String getHostName()
getHostName
in class ProcessEnvironment
public String getNodeName()
public File[] getJavaExtDirs()
null
, but may be an empty arraypublic File getHomeDir()
@Deprecated public File getModulesDir()
public File getBundlesDir()
Defaults to homeDir
/bundles
public File getServerBaseDir()
Defaults to homeDir
/standalone for a standalone server or
domain/servers/
public File getServerConfigurationDir()
Defaults to getServerBaseDir()
serverBaseDir}/configuration
public ConfigurationFile getServerConfigurationFile()
ConfigurationFile
that manages the server's configuration file.public File getServerDataDir()
Defaults to getServerBaseDir()
serverBaseDir}/data
public File getServerContentDir()
Defaults to getServerDataDir()
serverDataDir}/content
@Deprecated public File getServerDeployDir()
getServerContentDir()
getServerContentDir()
.public File getServerLogDir()
Defaults to getServerBaseDir()
serverBaseDir}/log
public File getServerTempDir()
Defaults to getServerBaseDir()
serverBaseDir}/tmp
public boolean isStartSuspended()
true
if the server should start in suspended modepublic File getDomainBaseDir()
Defaults to JBOSS_HOME
/domain
null
if this server is not running in a managed domain.public File getDomainConfigurationDir()
Defaults to getDomainBaseDir()
domainBaseDir}/configuration
null
if this server is not running in a managed domain.public ServerEnvironment.LaunchType getLaunchType()
public boolean isStandalone()
true
if this server is an independently managed serverpublic boolean isSelfContained()
true
if this server is self-containedpublic RunningMode getInitialRunningMode()
RunningMode
that was in effect when this server was launched.public RunningModeControl getRunningModeControl()
RunningModeControl
containing the current running mode of the servergetRunningModeControl
in class ProcessEnvironment
public ProductConfig getProductConfig()
ProductConfig
detected at startup.null
public UUID getInstanceUuid()
getInstanceUuid
in class ProcessEnvironment
public long getStartTime()
public static int getBootstrapMaxThreads()
BOOTSTRAP_MAX_THREADS
system property and if not set, defaults to 2*cpus.Runtime.availableProcessors()
protected String getProcessName()
getProcessName
in class ProcessEnvironment
protected void setProcessName(String processName)
setProcessName
in class ProcessEnvironment
protected boolean isRuntimeSystemPropertyUpdateAllowed(String propertyName, String propertyValue, boolean bootTime) throws OperationFailedException
isRuntimeSystemPropertyUpdateAllowed
in class ProcessEnvironment
OperationFailedException
protected void systemPropertyUpdated(String propertyName, String propertyValue)
systemPropertyUpdated
in class ProcessEnvironment
Copyright © 2017 JBoss by Red Hat. All rights reserved.