@Service public class ServerEnvironmentImpl extends Object implements ServerEnvironment, org.glassfish.hk2.api.PostConstruct
This primarily replaces all the system variables in V2.
ServerEnvironment.Status
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_ADMIN_CONSOLE_APP_NAME |
static String |
DEFAULT_ADMIN_CONSOLE_CONTEXT_ROOT |
static String |
kAppAltDDDirName |
static String |
kConfigDirName
folder where the configuration of this instance is stored
|
static String |
kConfigXMLFileName |
static String |
kConfigXMLFileNameBackup |
static String |
kDefaultLoggingPropertiesFileName |
static String |
kEJBStubDirName |
static String |
kGeneratedDirName
folder where all generated code like compiled jsps, stubs is stored
|
static String |
kGeneratedXMLDirName |
static String |
kInitFileName
init file name
|
static String |
kLoggingPropertiesFileName |
static String |
kPolicyFileDirName |
static String |
kRepositoryDirName |
DEFAULT_INSTANCE_NAME, kCompileJspDirName
Constructor and Description |
---|
ServerEnvironmentImpl()
Compute all the values per default.
|
ServerEnvironmentImpl(File root) |
Modifier and Type | Method and Description |
---|---|
File |
getApplicationAltDDPath()
Gets the directory to store external alternate deployment descriptors
Normally
ROOT/generated/altdd |
File |
getApplicationCompileJspPath()
Returns the path for compiled JSP Pages from an application
that is deployed on this instance.
|
File |
getApplicationEJBStubPath() |
File |
getApplicationGeneratedXMLPath() |
File |
getApplicationPolicyFilePath()
Returns the path for policy files for applications
deployed on this instance.
|
File |
getApplicationRepositoryPath()
Gets the directory to store deployed applications
Normally
ROOT/applications |
File |
getApplicationStubPath()
Gets the directory to store generated stuff.
|
File |
getConfigDirPath()
Gets the directory to store configuration.
|
File |
getDefaultAdminConsoleFolderOnDisk()
Returns the folder where the admin console application's folder (in the
name of admin console application) should be found.
|
String |
getDomainName() |
File |
getInitFilePath()
Gets the init.conf file.
|
String |
getInstanceName()
Every server has a name that can be found in the server element in domain.xml
|
File |
getInstanceRoot() |
File |
getJKS()
A Java KeyStore which is locked by administrator's master password.
|
File |
getLibPath()
Gets the directory for hosting user-provided jar files.
|
File |
getMasterPasswordFile()
A JCEKS keystore which is locked with a fixed-key.
|
String |
getProp(String key)
Return the value of one property.
|
Map<String,String> |
getProps() |
RuntimeType |
getRuntimeType()
Returns the process type of this instance.
|
com.sun.enterprise.module.bootstrap.StartupContext |
getStartupContext()
return the startup context used to initialize this runtime
|
ServerEnvironment.Status |
getStatus()
Gets the server status
|
File |
getTrustStore()
The truststore used by the server.
|
boolean |
isDas()
Am I a running GlassFish DAS server?
|
boolean |
isDebug() |
boolean |
isEmbedded() |
boolean |
isInstance()
Am I a running GlassFish server instance?
|
boolean |
isMicro() |
boolean |
isVerbose() |
void |
postConstruct()
This is where the real initialization happens.
|
void |
setStatus(ServerEnvironment.Status status) |
public static final String kGeneratedDirName
public static final String kRepositoryDirName
public static final String kAppAltDDDirName
public static final String kEJBStubDirName
public static final String kGeneratedXMLDirName
public static final String kPolicyFileDirName
public static final String kConfigXMLFileName
public static final String kConfigXMLFileNameBackup
public static final String kLoggingPropertiesFileName
public static final String kDefaultLoggingPropertiesFileName
public static final String kConfigDirName
public static final String kInitFileName
public static final String DEFAULT_ADMIN_CONSOLE_CONTEXT_ROOT
public static final String DEFAULT_ADMIN_CONSOLE_APP_NAME
public ServerEnvironmentImpl()
public ServerEnvironmentImpl(File root)
public void postConstruct()
postConstruct
in interface org.glassfish.hk2.api.PostConstruct
public String getDomainName()
getDomainName
in interface ServerEnvironment
public File getInstanceRoot()
getInstanceRoot
in interface ServerEnvironment
public com.sun.enterprise.module.bootstrap.StartupContext getStartupContext()
ServerEnvironment
getStartupContext
in interface ServerEnvironment
public File getConfigDirPath()
ROOT/config
getConfigDirPath
in interface ServerEnvironment
public File getApplicationRepositoryPath()
ROOT/applications
getApplicationRepositoryPath
in interface ServerEnvironment
public File getApplicationStubPath()
ROOT/generated
getApplicationStubPath
in interface ServerEnvironment
public File getInitFilePath()
public File getLibPath()
ROOT/lib
getLibPath
in interface ServerEnvironment
public File getApplicationEJBStubPath()
getApplicationEJBStubPath
in interface ServerEnvironment
public File getApplicationGeneratedXMLPath()
getApplicationGeneratedXMLPath
in interface ServerEnvironment
public File getApplicationCompileJspPath()
getApplicationCompileJspPath
in interface ServerEnvironment
public File getApplicationPolicyFilePath()
getApplicationPolicyFilePath
in interface ServerEnvironment
public File getApplicationAltDDPath()
ROOT/generated/altdd
getApplicationAltDDPath
in interface ServerEnvironment
public final String getProp(String key)
key
- the name of the propertypublic File getDefaultAdminConsoleFolderOnDisk()
public File getMasterPasswordFile()
ServerEnvironment
getMasterPasswordFile
in interface ServerEnvironment
public File getJKS()
ServerEnvironment
getJKS
in interface ServerEnvironment
public File getTrustStore()
ServerEnvironment
getTrustStore
in interface ServerEnvironment
public ServerEnvironment.Status getStatus()
ServerEnvironment
getStatus
in interface ServerEnvironment
public void setStatus(ServerEnvironment.Status status)
public boolean isEmbedded()
public RuntimeType getRuntimeType()
ServerEnvironment
getRuntimeType
in interface ServerEnvironment
public String getInstanceName()
getInstanceName
in interface ServerEnvironment
public boolean isInstance()
isInstance
in interface ServerEnvironment
public boolean isDas()
isDas
in interface ServerEnvironment
public boolean isMicro()
isMicro
in interface ServerEnvironment
public boolean isDebug()
public boolean isVerbose()
Copyright © 2021. All rights reserved.