Fields Summary |
---|
public final String | SERVER_XMLXXX: should move these to Config API |
public final String | DEFAULT_DOMAIN_NAME |
public final String | CONFIG_DIR |
private String[] | cmdLineArgsserver command line arguments |
private com.sun.enterprise.server.pluggable.PluggableFeatureFactory | featureFactoryPluggable features factory |
private String | installRootinstall root of this server instance |
private String | instanceNamename of this server instance |
private static com.sun.enterprise.util.i18n.StringManager | localStringslocal string manager for i18n |
private static ClassLoader | commonClassLoadercommon class loader i.e., $instance/lib classloader |
private static ClassLoader | sharedClassLoadershared class loader i.e., connector class loader |
private ClassLoader | lifeCycleClassLoaderparent class loader for the life cycle modules |
private com.sun.enterprise.config.ConfigContext | configContextserver config context |
private com.sun.enterprise.config.serverbeans.Server | serverserver config bean |
private String | serverConfigPath |
private String | serverConfigURL |
private com.sun.enterprise.instance.InstanceEnvironment | instanceEnvironmentenvironment object for this server instance |
Methods Summary |
---|
public java.lang.String[] | getCmdLineArgs()Get the server command-line arguments
return cmdLineArgs;
|
public java.lang.ClassLoader | getCommonClassLoader()Get the classloader that loads .jars in $instance/lib and classes
in $instance/lib/classes.
return this.commonClassLoader;
|
public com.sun.enterprise.config.serverbeans.Server | getConfigBean()Get the server configuration bean.
if (server != null) {
return server;
}
// create the Server config bean
if (configContext != null) {
server = ServerBeansFactory.getServerBean(configContext);
} else {
// perhaps uninitialized?
String msg = localStrings.getString(
"serverContext.config_context_is_null");
throw new ConfigException(msg);
}
return this.server;
|
public com.sun.enterprise.config.ConfigContext | getConfigContext()Returns the config context for this server.
return this.configContext;
|
public java.lang.String | getConfigURL(java.lang.String configName)Get a URL representation of any configuration file in server config path
String configURI = instanceEnvironment.getConfigFilePath();
// XXX: Config API Doesn't expect URLs
return configURI;
// if (isWindows())
// return "file:/" + configURI;
// else
// return "file:" + configURI;
|
public java.lang.String | getDefaultDomainName()get the default domain name
return DEFAULT_DOMAIN_NAME;
|
public javax.naming.InitialContext | getInitialContext()Get the initial naming context.
// XXX: cleanup static instance variables
NamingManager mgr = Switch.getSwitch().getNamingManager();
if (mgr == null) {
return null;
}
return (InitialContext)(mgr.getInitialContext());
|
public java.lang.String | getInstallRoot()Get server installation root
return this.installRoot;
|
public com.sun.enterprise.instance.InstanceEnvironment | getInstanceEnvironment()Returns the environment object for this server instance.
if (this.instanceEnvironment == null) {
this.instanceEnvironment =
new InstanceEnvironment(this.instanceName);
}
return this.instanceEnvironment;
|
public java.lang.String | getInstanceName()Get the server instance name
return instanceName;
|
public com.sun.enterprise.InvocationManager | getInvocationManager()Get the J2EE Server invocation manager
return Switch.getSwitch().getInvocationManager();
|
public java.lang.ClassLoader | getLifecycleParentClassLoader()Returns the parent class loader for the life cycle modules.
return this.lifeCycleClassLoader;
|
public com.sun.enterprise.admin.monitor.registry.MonitoringRegistry | getMonitoringRegistry()Returns the MonitoringRegistry implementation used for registration of
monitoring stats.
/* Get the class from appserv-rt.jar for now through
* reflection */
final String REG_IMPL_CLASS =
"com.sun.enterprise.admin.monitor.registry.spi.MonitoringRegistrationHelper";
final String METHOD = "getInstance";
try {
final Class c = Class.forName(REG_IMPL_CLASS);
final java.lang.reflect.Method m = c.getMethod(METHOD, (Class[]) null);
final MonitoringRegistry r = (MonitoringRegistry) m.invoke(c, (Object[]) null);
return r;
}
catch(Throwable t) {
throw new RuntimeException(t);
}
|
public com.sun.enterprise.server.pluggable.PluggableFeatureFactory | getPluggableFeatureFactory()Get a factory for obtaining implementation of pluggable features.
return featureFactory;
|
public java.lang.String | getServerConfigPath()Get the path to the server configuration directory
return instanceEnvironment.getConfigDirPath();
|
public java.lang.String | getServerConfigURL()Get a URL representation of server configuration
return instanceEnvironment.getConfigFilePath();
|
public java.lang.ClassLoader | getSharedClassLoader()Returns the shared class loader of the server instance.
return this.sharedClassLoader;
|
private boolean | isWindows()Are we running on Windows platform?
return (File.separatorChar == '\\");
|
protected void | setCmdLineArgs(java.lang.String[] cmdLineArgs)Set the server command-line arguments
this.cmdLineArgs = cmdLineArgs;
|
protected void | setCommonClassLoader(java.lang.ClassLoader cl)Set the classloader that loads .jars in $instance/lib and classes
in $instance/lib/classes.
Only allow classes in this package to set this value.
this.commonClassLoader = cl;
|
public void | setConfigContext(com.sun.enterprise.config.ConfigContext config)Sets the given config context.
This method gets called from the AdminEventMulticaster to set the
config context after event processing is complete.
this.configContext = config;
|
protected void | setInstallRoot(java.lang.String installRoot)Install root of the server
this.installRoot = installRoot;
|
void | setInstanceEnvironment(com.sun.enterprise.instance.InstanceEnvironment instanceEnv)Sets the instance environment object for this server instance.
this.instanceEnvironment = instanceEnv;
|
protected void | setInstanceName(java.lang.String instanceName)Instace name
this.instanceName = instanceName;
|
protected void | setLifecycleParentClassLoader(java.lang.ClassLoader cl)Sets the parent class loader for the life cycle module
this.lifeCycleClassLoader = cl;
|
public void | setPluggableFeatureFactory(com.sun.enterprise.server.pluggable.PluggableFeatureFactory obj)Set pluggable features factory. Initialization of server context
must be followed by a call to this method. An easy way to obtain
a PluggableFeatureFactory is to call the static method getInstance()
on com.sun.enterprise.server.pluggable PluggableFeatureFactoryImpl
class.
featureFactory = obj;
|
protected void | setSharedClassLoader(java.lang.ClassLoader cl)Sets the shared class loader for the instance.
Only allow classes in this package to set this value.
this.sharedClassLoader = cl;
|