ServiceConfigFactorypublic class ServiceConfigFactory extends Object Responsible for creating ServiceConfig object per configuration in
domain.xml |
Fields Summary |
---|
private static Map | diagnosticServiceConfigsMap between a config and it's diagnostic service configuration.
Multiple instances may be using same configuration in which case
there is only one ServiceConfig object for those instances. | private static Map | instanceConfigMapinstance name to config name map | private static ServiceConfig | defaultConfigConfig with default values | private static ServiceConfigFactory | configFactory |
Constructors Summary |
---|
private ServiceConfigFactory()Creates a new instance of ServiceConfigFactory
diagnosticServiceConfigs = new HashMap(5);
instanceConfigMap = new HashMap(5);
|
Methods Summary |
---|
public static ServiceConfig | getDefaultServiceConfig()
if( defaultConfig == null) {
defaultConfig = new ServiceConfig(true,true, true,
true,true, true, Defaults.MIN_LOG_LEVEL,
Defaults.MAX_NO_OF_ENTRIES, Defaults.LOG_FILE, null, null);
return defaultConfig;
}
return null;
| public static synchronized com.sun.enterprise.diagnostics.ServiceConfigFactory | getInstance()Returns a ServiceConfgiFactory object
if (configFactory == null)
configFactory = new ServiceConfigFactory();
return configFactory;
| public ServiceConfig | getServiceConfig(java.lang.String instanceName)Gets service config for a instance.
if (instanceName != null) {
String configName = (String)instanceConfigMap.get(instanceName);
return (ServiceConfig)diagnosticServiceConfigs.get(configName);
}
return null;
| public ServiceConfig | getServiceConfig(boolean local, java.lang.String repositoryRoot, java.lang.String instanceName)Gets diagnostic-service configuration
if (repositoryRoot != null && instanceName != null) {
try {
ServiceConfig config = new ServiceConfig(local,
repositoryRoot, instanceName);
return config;
}catch(Exception de) {
// If for some reason diagnostic-service element in domain.xml
// is not readable, return diagnostic information with
// default values.
return getDefaultServiceConfig();
}
}
return null;
|
|