ServiceConfigpublic class ServiceConfig extends Object Represents diagnostic service related config information from domain.xml |
Fields Summary |
---|
private static Logger | logger | private String | logFile | private int | minLogLevel | private int | maxNoOfEntries | private String | repositoryDir | private String | instanceName | private boolean | local | private boolean | captureSystemInfoEnabled | private boolean | captureChecksumEnabled | private boolean | captureAppDDEnabled | private boolean | captureInstallLogEnabled | private boolean | verifyDomainEnabled | private boolean | captureHadbInfoEnabled | private ServiceConfigHelper | configHelper |
Constructors Summary |
---|
public ServiceConfig(boolean localFlag, String repositoryDir, String instanceName)
local = localFlag;
this.repositoryDir = repositoryDir;
this.instanceName = instanceName;
setValues();
| public ServiceConfig(boolean captureChecksumEnabled, boolean captureAppDDEnabled, boolean captureInstallLogEnabled, boolean verifyDomainEnabled, boolean captureHadbInfoEnabled, boolean captureSystemInfoEnabled, int minLogLevel, int maxNoOfEntries, String logFile, String repositoryDir, String instanceName)
this.captureChecksumEnabled = captureChecksumEnabled;
this.captureAppDDEnabled = captureAppDDEnabled;
this.captureInstallLogEnabled = captureInstallLogEnabled;
this.verifyDomainEnabled = verifyDomainEnabled;
this.captureHadbInfoEnabled = captureHadbInfoEnabled;
this.captureSystemInfoEnabled = captureSystemInfoEnabled;
this.minLogLevel = minLogLevel;
this.maxNoOfEntries = maxNoOfEntries;
this.logFile = logFile;
this.instanceName = instanceName;
this.repositoryDir = repositoryDir;
|
Methods Summary |
---|
public void | debug()
logger.log(Level.FINEST, "diagnostic-service.capture_app_dd ",
new Object[] {captureAppDDEnabled});
logger.log(Level.FINEST, "diagnostic-service.capture_hadb_info",
new Object[]{captureHadbInfoEnabled});
logger.log(Level.FINEST, "diagnostic-service.capture_checksum",
new Object[]{captureChecksumEnabled});
logger.log(Level.FINEST, "diagnostic-service.capture_install_log",
new Object[]{captureInstallLogEnabled});
logger.log(Level.FINEST, "diagnostic-service.min_log_level",
new Object[]{minLogLevel});
logger.log(Level.FINEST, "diagnostic-service.max_log_entries",
new Object[]{maxNoOfEntries});
| private java.lang.String | getAttribute(java.lang.String attribute)Retrieve value of the supplied attribute
return configHelper.getAttribute(attribute);
| private boolean | getBooleanAttribute(java.lang.String attrName)
return Boolean.valueOf(getAttribute(attrName)).booleanValue();
| public java.lang.String | getConfigName()Returns null, if ServiceConfig is created with default values.
if (configHelper != null)
return configHelper.getConfigName();
return null;
| public java.lang.String | getInstanceName()
return instanceName;
| public java.lang.String | getLogFile()Returns value of file of log-service
return logFile;
| public int | getMaxNoOfEntries()Returns value of max-log-entries of diagnostic-service
return maxNoOfEntries;
| public int | getMinLogLevel()Returns value of min-log-level of diagnostic-service
return minLogLevel;
| public java.lang.String | getRepositoryDir()Returns central or cache repository location
return repositoryDir;
| public boolean | isCaptureAppDDEnabled()Returns true capturing app DD is enabled
return captureAppDDEnabled;
| public boolean | isCaptureChecksumEnabled()Returns true if check sum is captured
return captureChecksumEnabled;
| public boolean | isCaptureHadbInfoEnabled()Returns true capturing app DD is enabled
return captureHadbInfoEnabled;
| public boolean | isCaptureInstallLogEnabled()Returns true capturing install log is enabled
return captureInstallLogEnabled;
| public boolean | isCaptureSystemInfoEnabled()Returns true if output of verify-domain is captured
return captureSystemInfoEnabled;
| public boolean | isVerifyDomainEnabled()Returns true if output of verify-domain is captured
return verifyDomainEnabled;
| private void | setValues()Initializes config values
//setRepositoryDir();
configHelper = new ServiceConfigHelper(repositoryDir, instanceName, local);
minLogLevel = Level.parse
(getAttribute(ServerTags.MIN_LOG_LEVEL)).intValue();
logFile = getAttribute(ServerTags.FILE);
maxNoOfEntries = Integer.parseInt
(getAttribute(ServerTags.MAX_LOG_ENTRIES));
captureAppDDEnabled = getBooleanAttribute(ServerTags.CAPTURE_APP_DD);
captureInstallLogEnabled =getBooleanAttribute(ServerTags.CAPTURE_INSTALL_LOG);
verifyDomainEnabled = getBooleanAttribute(ServerTags.VERIFY_CONFIG);
captureHadbInfoEnabled = getBooleanAttribute(ServerTags.CAPTURE_HADB_INFO);
captureChecksumEnabled = getBooleanAttribute(ServerTags.COMPUTE_CHECKSUM);
captureSystemInfoEnabled = getBooleanAttribute(ServerTags.CAPTURE_SYSTEM_INFO);
| public java.lang.String | toString()
return getInstanceName() + "," + getConfigName() +
"," + getMaxNoOfEntries() +"," + getMinLogLevel() +
"," + getLogFile() +
"," + getRepositoryDir() + "," + isCaptureAppDDEnabled() +
"," + isCaptureChecksumEnabled() +
"," + isCaptureHadbInfoEnabled() +
"," + isCaptureInstallLogEnabled() +
"," + isVerifyDomainEnabled() ;
|
|