org.rhq.plugins.agent
Class AgentSnapshotReport

java.lang.Object
  extended by org.rhq.core.pluginapi.util.SnapshotReport
      extended by org.rhq.plugins.agent.AgentSnapshotReport

public class AgentSnapshotReport
extends SnapshotReport

Performs some slight customizations of the snapshot report utility such as taking a snapshot of the live configuration. It also takes the agent plugin configuration and builds the report configuration out of it.

Author:
John Mazzitelli

Nested Class Summary
 
Nested classes/interfaces inherited from class org.rhq.core.pluginapi.util.SnapshotReport
SnapshotReport.RegexFilenameFilter
 
Field Summary
 
Fields inherited from class org.rhq.core.pluginapi.util.SnapshotReport
PROP_ADDITIONAL_FILES_DIRECTORY, PROP_ADDITIONAL_FILES_LIST, PROP_ADDITIONAL_FILES_RECURSIVE, PROP_ADDITIONAL_FILES_REGEX, PROP_BASE_DIRECTORY, PROP_CONFIG_DIRECTORY, PROP_CONFIG_RECURSIVE, PROP_CONFIG_REGEX, PROP_DATA_DIRECTORY, PROP_DATA_RECURSIVE, PROP_DATA_REGEX, PROP_LOG_DIRECTORY, PROP_LOG_RECURSIVE, PROP_LOG_REGEX, PROP_REPORT_OUTPUT_DIRECTORY, PROP_SNAPSHOT_ADDITIONAL_FILES, PROP_SNAPSHOT_CONFIG_FILES, PROP_SNAPSHOT_DATA_FILES, PROP_SNAPSHOT_LOG_FILES, REPORT_CONFIG_DIRECTORY, REPORT_DATA_DIRECTORY, REPORT_LOG_DIRECTORY
 
Constructor Summary
AgentSnapshotReport(String name, String description, org.rhq.core.domain.configuration.Configuration agentPluginConfiguration, String agentInstallDir, Properties agentConfiguration, String tmpDirectory)
          Constructor used to build this agent snapshot report object.
 
Method Summary
 File generate()
          We want to snapshot the live configuration taken from the Java Preferences so this will write a temporary conf file with that live data so it gets placed in the snapshot report.
 
Methods inherited from class org.rhq.core.pluginapi.util.SnapshotReport
getAdditionalFilesToSnapshot, getAllFilesToSnapshot, getConfigFilesToSnapshot, getConfiguration, getDataFilesToSnapshot, getDescription, getLogFilesToSnapshot, getName, getSnapshotReportFile
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AgentSnapshotReport

public AgentSnapshotReport(String name,
                           String description,
                           org.rhq.core.domain.configuration.Configuration agentPluginConfiguration,
                           String agentInstallDir,
                           Properties agentConfiguration,
                           String tmpDirectory)
Constructor used to build this agent snapshot report object.

Parameters:
name - the name of the snapshot report
description - the description of this report
agentPluginConfiguration - the plugin configuration for the agent resource whose snapshot report is to be generated
agentInstallDir - the agent's root installation directory
agentConfiguration - the agent's live configuration
tmpDirectory - a tmp location where we can store the snapshot
Method Detail

generate

public File generate()
              throws Exception
We want to snapshot the live configuration taken from the Java Preferences so this will write a temporary conf file with that live data so it gets placed in the snapshot report.

Overrides:
generate in class SnapshotReport
Throws:
Exception


Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.