public class HostControllerEnvironment extends ProcessEnvironment
Modifier and Type | Field and Description |
---|---|
static String |
CONTROLLER_TEMP_DIR
Common alias between domain and standalone mode.
|
static String |
DOMAIN_BASE_DIR
Constant that holds the name of the system property
for specifying
getDomainBaseDir() the domain base directory}. |
static String |
DOMAIN_CONFIG_DIR
Constant that holds the name of the system property
for specifying
getDomainConfigurationDir() the domain configuration directory}. |
static String |
DOMAIN_CONTENT_DIR
Constant that holds the name of the system property
for specifying
getDomainContentDir() the domain content repository directory}. |
static String |
DOMAIN_DATA_DIR
Constant that holds the name of the system property
for specifying
getDomainDataDir() the domain data directory}. |
static String |
DOMAIN_DEPLOYMENT_DIR
Deprecated.
|
static String |
DOMAIN_LOG_DIR
Constant that holds the name of the system property
for specifying
getDomainLogDir() the domain log directory}. |
static String |
DOMAIN_SERVERS_DIR
Constant that holds the name of the system property
for specifying
getDomainServersDir() the managed domain server parent directory}. |
static String |
DOMAIN_TEMP_DIR
Constant that holds the name of the system property
for specifying
getDomainTempDir() the domain temporary file storage directory}. |
static String |
HOME_DIR
Constant that holds the name of the system property
for specifying the
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 that this
server is running on.
|
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 multicast address information from the command-line (-u).
|
static String |
JBOSS_DOMAIN_DEFAULT_CONFIG
The system property used to store the name of the default domain configuration file.
|
static String |
JBOSS_DOMAIN_MASTER_ADDRESS
The default system property used to store the master Host Controller's native management interface address
from the command line.
|
static String |
JBOSS_DOMAIN_MASTER_PORT
The default system property used to store the master Host Controller's native of the master port from the command line.
|
static String |
JBOSS_HOST_DEFAULT_CONFIG
The system property used to store the name of the default host configuration file.
|
static String |
JBOSS_HOST_MANAGEMENT_UUID
The system property used to set the unique identifier for this host exposed via the
uuid attribute of the root resource of the host's portion of the management resource tree. |
static String |
MODULES_DIR
Deprecated.
has no useful meaning
|
static String |
QUALIFIED_HOST_NAME
Constant that holds the name of the system property for specifying the fully-qualified name of the host that this server
is running on.
|
JBOSS_DOMAIN_UUID, KERNEL_DIR, NAME, UUID_FILE
Constructor and Description |
---|
HostControllerEnvironment(Map<String,String> hostSystemProperties,
boolean isRestart,
String modulePath,
InetAddress processControllerAddress,
Integer processControllerPort,
InetAddress hostControllerAddress,
Integer hostControllerPort,
String defaultJVM,
String domainConfig,
String initialDomainConfig,
String hostConfig,
String initialHostConfig,
RunningMode initialRunningMode,
boolean backupDomainFiles,
boolean useCachedDc,
ProductConfig productConfig)
Only for test cases
|
HostControllerEnvironment(Map<String,String> hostSystemProperties,
boolean isRestart,
String modulePath,
InetAddress processControllerAddress,
Integer processControllerPort,
InetAddress hostControllerAddress,
Integer hostControllerPort,
String defaultJVM,
String domainConfig,
String initialDomainConfig,
String hostConfig,
String initialHostConfig,
RunningMode initialRunningMode,
boolean backupDomainFiles,
boolean useCachedDc,
ProductConfig productConfig,
boolean securityManagerEnabled,
long startTime,
ProcessType processType) |
Modifier and Type | Method and Description |
---|---|
File |
getDefaultJVM()
Gets the location of the default java executable to use when launch managed domain servers.
|
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.
|
ConfigurationFile |
getDomainConfigurationFile() |
File |
getDomainContentDir()
Gets the directory in which a Host Controller will store domain-managed user content (e.g.
|
File |
getDomainDataDir()
Gets the directory in which a Host Controller or Process Controller can store private internal state that
should survive a process restart.
|
File |
getDomainDeploymentDir()
Deprecated.
|
File |
getDomainLogDir()
Gets the directory in which a Host Controller or Process Controller can write log files.
|
File |
getDomainServersDir()
Gets the directory under domain managed servers will write any persistent data.
|
File |
getDomainTempDir()
Gets the directory in which a Host Controller or Process Controller can store private internal state that
does not need to survive a process restart.
|
File |
getHomeDir()
Gets the root directory for this JBoss installation.
|
ConfigurationFile |
getHostConfigurationFile() |
InetAddress |
getHostControllerAddress()
Gets the address the process controller told this Host Controller to use for communication with it.
|
String |
getHostControllerName()
Gets the name by which this host controller is known in the domain.
|
Integer |
getHostControllerPort()
Gets the port the process controller told this Host Controller to use for communication with it.
|
String |
getHostName()
Get the local host name detected at server startup.
|
Map<String,String> |
getHostSystemProperties()
Initial set of system properties provided to this Host Controller at boot via the command line.
|
RunningMode |
getInitialRunningMode()
Gets the
RunningMode that was in effect when this Host Controller was launched. |
UUID |
getInstanceUuid()
Get the UUID of this process.
|
File |
getModulesDir()
Deprecated.
has no reliable meaning
|
InetAddress |
getProcessControllerAddress()
Gets the address the process controller passed to this process
to use in communicating with it.
|
Integer |
getProcessControllerPort()
Gets the port number the process controller passed to this process
to use in communicating with it.
|
protected String |
getProcessName()
Gets the resolved name of this process; a value previously passed to
ProcessEnvironment.setProcessName(String) or
a value derived from the environment. |
ProcessType |
getProcessType()
The process type for this host controller environment.
|
ProductConfig |
getProductConfig()
Gets the
ProductConfig detected at startup. |
String |
getQualifiedHostName()
Get the fully-qualified host name detected at server startup.
|
HostRunningModeControl |
getRunningModeControl()
Get the
HostRunningModeControl containing the current running mode of the host controller |
long |
getStartTime()
Gets the time when this process was started.
|
boolean |
isBackupDomainFiles()
Whether we should maintain a copy of the domain configuration file even though we are not the
master host controller for the domain.
|
boolean |
isRestart()
Gets whether this was a restarted host controller.
|
protected boolean |
isRuntimeSystemPropertyUpdateAllowed(String propertyName,
String propertyValue,
boolean bootTime)
Gets whether updating the runtime system properties with the given property is allowed.
|
boolean |
isUseCachedDc()
Whether we should try to start up with a locally cached copy of the domain configuration file rather than
trying to connect to a master host controller.
|
protected void |
setProcessName(String processName)
Sets the process name.
|
protected void |
systemPropertyUpdated(String propertyName,
String propertyValue)
Notifies this
ProcessEnvironment that the runtime value of the given system property has been updated,
allowing it to update any state that was originally set via the system property during primordial process boot. |
getProcessNameReadHandler, getProcessNameWriteHandler, obtainProcessUUID, resolveGUID
public static final String HOME_DIR
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 DOMAIN_BASE_DIR
getDomainBaseDir()
the domain base directory}.
Defaults to HOME_DIR/domain.
public static final String DOMAIN_CONFIG_DIR
getDomainConfigurationDir()
the domain configuration directory}.
Defaults to DOMAIN_BASE_DIR/configuration .
public static final String DOMAIN_DATA_DIR
getDomainDataDir()
the domain data directory}.
Defaults to DOMAIN_BASE_DIR/data.
public static final String DOMAIN_CONTENT_DIR
getDomainContentDir()
the domain content repository directory}.
Defaults to DOMAIN_DATA_DIR/content.
@Deprecated public static final String DOMAIN_DEPLOYMENT_DIR
DOMAIN_CONTENT_DIR
DOMAIN_CONTENT_DIR
.public static final String DOMAIN_LOG_DIR
getDomainLogDir()
the domain log directory}.
Defaults to DOMAIN_BASE_DIR/log.
public static final String DOMAIN_SERVERS_DIR
getDomainServersDir()
the managed domain server parent directory}.
Defaults to DOMAIN_BASE_DIR/servers.
public static final String DOMAIN_TEMP_DIR
getDomainTempDir()
the domain temporary file storage directory}.
Defaults to DOMAIN_BASE_DIR/tmp .
public static final String HOST_NAME
public static final String QUALIFIED_HOST_NAME
public static final String CONTROLLER_TEMP_DIR
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_DOMAIN_MASTER_ADDRESS
public static final String JBOSS_DOMAIN_MASTER_PORT
public static final String JBOSS_DOMAIN_DEFAULT_CONFIG
-c
or --domain-config
command line switches
to explicitly set the domain configuration file.public static final String JBOSS_HOST_DEFAULT_CONFIG
--host-config
command line switch
to explicitly set the host configuration file.public static final String JBOSS_HOST_MANAGEMENT_UUID
uuid
attribute of the root resource of the host's portion of the management resource tree.
If the property is not set any previously persisted UUID will be used; otherwise a random UUID will be generated.public HostControllerEnvironment(Map<String,String> hostSystemProperties, boolean isRestart, String modulePath, InetAddress processControllerAddress, Integer processControllerPort, InetAddress hostControllerAddress, Integer hostControllerPort, String defaultJVM, String domainConfig, String initialDomainConfig, String hostConfig, String initialHostConfig, RunningMode initialRunningMode, boolean backupDomainFiles, boolean useCachedDc, ProductConfig productConfig)
public HostControllerEnvironment(Map<String,String> hostSystemProperties, boolean isRestart, String modulePath, InetAddress processControllerAddress, Integer processControllerPort, InetAddress hostControllerAddress, Integer hostControllerPort, String defaultJVM, String domainConfig, String initialDomainConfig, String hostConfig, String initialHostConfig, RunningMode initialRunningMode, boolean backupDomainFiles, boolean useCachedDc, ProductConfig productConfig, boolean securityManagerEnabled, long startTime, ProcessType processType)
public InetAddress getProcessControllerAddress()
public Integer getProcessControllerPort()
public InetAddress getHostControllerAddress()
public Integer getHostControllerPort()
public boolean isRestart()
public boolean isBackupDomainFiles()
true
if we should grab the filespublic boolean isUseCachedDc()
true
if we start with a locally cached copy of the domain configuration filepublic RunningMode getInitialRunningMode()
RunningMode
that was in effect when this Host Controller was launched.public HostRunningModeControl getRunningModeControl()
HostRunningModeControl
containing the current running mode of the host controllergetRunningModeControl
in class ProcessEnvironment
public ProductConfig getProductConfig()
ProductConfig
detected at startup.null
public File getHomeDir()
@Deprecated public File getModulesDir()
public File getDomainBaseDir()
Defaults to JBOSS_HOME
/domain
public File getDomainConfigurationDir()
Defaults to getDomainBaseDir()
domainBaseDir}/configuration
public File getDomainDataDir()
Defaults to getDomainBaseDir()
domainBaseDir}/data
public File getDomainContentDir()
Defaults to getDomainDataDir()
domainDataDir}/content
@Deprecated public File getDomainDeploymentDir()
getDomainContentDir()
getDomainContentDir()
.public File getDomainLogDir()
Defaults to getDomainBaseDir()
domainBaseDir}/log
public File getDomainServersDir()
Defaults to getDomainBaseDir()
domainBaseDir}/servers
public File getDomainTempDir()
Defaults to getDomainBaseDir()
domainBaseDir}/tmp
public File getDefaultJVM()
public Map<String,String> getHostSystemProperties()
public String getQualifiedHostName()
getQualifiedHostName
in class ProcessEnvironment
public String getHostName()
host controller name
. Defaults to the portion of
the qualified host name
following the first '.'.getHostName
in class ProcessEnvironment
public String getHostControllerName()
qualified host name
if the name
attribute is not
specified on the root element of the host configuration file (e.g. host.xml).getHostControllerName
in class ProcessEnvironment
public long getStartTime()
protected String getProcessName()
ProcessEnvironment
ProcessEnvironment.setProcessName(String)
or
a value derived from the environment.getProcessName
in class ProcessEnvironment
null
protected void setProcessName(String processName)
ProcessEnvironment
ProcessEnvironment.getProcessNameWriteHandler()
; its visibility is protected only because subclasses need to implement it.setProcessName
in class ProcessEnvironment
processName
- the process name. May be null
in which case a default process name should be used.public ProcessType getProcessType()
protected boolean isRuntimeSystemPropertyUpdateAllowed(String propertyName, String propertyValue, boolean bootTime)
ProcessEnvironment
isRuntimeSystemPropertyUpdateAllowed
in class ProcessEnvironment
propertyName
- the name of the property. Cannot be null
propertyValue
- the value of the property. May be null
bootTime
- true
if the process is currently bootingtrue
if the update can be applied to the runtime system properties; false if it
should just be stored in the persistent configuration and the process should be put into
reload-required state
.protected void systemPropertyUpdated(String propertyName, String propertyValue)
ProcessEnvironment
ProcessEnvironment
that the runtime value of the given system property has been updated,
allowing it to update any state that was originally set via the system property during primordial process boot.
This method should only be invoked after a call to ProcessEnvironment.isRuntimeSystemPropertyUpdateAllowed(String, String, boolean)
has returned true
.systemPropertyUpdated
in class ProcessEnvironment
propertyName
- the name of the property. Cannot be null
propertyValue
- the value of the property. May be null
public ConfigurationFile getHostConfigurationFile()
public ConfigurationFile getDomainConfigurationFile()
public UUID getInstanceUuid()
ProcessEnvironment
getInstanceUuid
in class ProcessEnvironment
Copyright © 2023 JBoss by Red Hat. All rights reserved.