com.ebay.carad.os.vitalsigns.listeners
Class FileCopyingListener

java.lang.Object
  extended by com.ebay.carad.os.vitalsigns.listeners.AbstractReportingListener
      extended by com.ebay.carad.os.vitalsigns.listeners.FileCopyingListener
All Implemented Interfaces:
IReportingListener

public class FileCopyingListener
extends AbstractReportingListener

Used to copy arbitrary files when reporting is started. This is useful if you have files associated with the output of the reporting that are not directly generated by the reporting.

Files can currently be copied from either the classpath or a file system path.

Version:
$Id$
Author:
Jeremy Thomerson

Field Summary
private static org.apache.log4j.Logger LOGGER
           
private  java.util.Map mClasspathPaths
           
private  java.util.Map mFilesystemPaths
           
 
Constructor Summary
FileCopyingListener()
           
 
Method Summary
 void addClasspathPath(java.lang.String path, java.lang.String relativeOutputPath)
           
 void addFilesystemPath(java.lang.String path, java.lang.String relativeOutputPath)
           
private  void copyFile(IDashboardAgent agent, java.io.InputStream st, java.lang.String relativeOutputPath)
           
 void reportingPreStart(IDashboardAgent agent)
           
 void setClasspathPaths(java.util.Map classpathPaths)
           
 void setFilesystemPaths(java.util.Map filesystemPaths)
           
 
Methods inherited from class com.ebay.carad.os.vitalsigns.listeners.AbstractReportingListener
reportingComplete, reportingException, reportRan
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOGGER

private static final org.apache.log4j.Logger LOGGER

mClasspathPaths

private java.util.Map mClasspathPaths

mFilesystemPaths

private java.util.Map mFilesystemPaths
Constructor Detail

FileCopyingListener

public FileCopyingListener()
Method Detail

setClasspathPaths

public void setClasspathPaths(java.util.Map classpathPaths)
Parameters:
classpathPaths - Map<String, String> <path on classpath, relative output path>

setFilesystemPaths

public void setFilesystemPaths(java.util.Map filesystemPaths)
Parameters:
filesystemPaths - Map<String, String> <path on file system, relative output path>

addClasspathPath

public void addClasspathPath(java.lang.String path,
                             java.lang.String relativeOutputPath)

addFilesystemPath

public void addFilesystemPath(java.lang.String path,
                              java.lang.String relativeOutputPath)

reportingPreStart

public void reportingPreStart(IDashboardAgent agent)
Specified by:
reportingPreStart in interface IReportingListener
Overrides:
reportingPreStart in class AbstractReportingListener

copyFile

private void copyFile(IDashboardAgent agent,
                      java.io.InputStream st,
                      java.lang.String relativeOutputPath)
               throws java.io.IOException
Throws:
java.io.IOException


Copyright © 2004-2009. All Rights Reserved.