org.schmant.support.io
Class AppendToFileProcessOutputStrategy

java.lang.Object
  extended by org.schmant.support.io.AppendToFileProcessOutputStrategy
All Implemented Interfaces:
ProcessOutputStrategy

public class AppendToFileProcessOutputStrategy
extends Object
implements ProcessOutputStrategy

This is an process output strategy that appends the output of a process to a file. If the file does not already exist, it is created.

Since:
0.5
Author:
Karl Gustafsson

Constructor Summary
AppendToFileProcessOutputStrategy(FutureEntityFactory fef)
          Create a process output strategy that will append the monitored process' output to the file referenced by a future entity created by the supplied factory.
AppendToFileProcessOutputStrategy(FutureFile f)
          Create a process output strategy that will append the monitored process' output to the file referenced by the future entity.
AppendToFileProcessOutputStrategy(WritableFile f)
          Create a process output strategy that will append the output of the monitored process to the supplied file.
 
Method Summary
 ProcessOutputListener getOutputListener()
          Create a new process output listener for listening to a process.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AppendToFileProcessOutputStrategy

public AppendToFileProcessOutputStrategy(WritableFile f)
Create a process output strategy that will append the output of the monitored process to the supplied file.

Parameters:
f - The file to write to.

AppendToFileProcessOutputStrategy

public AppendToFileProcessOutputStrategy(FutureFile f)
Create a process output strategy that will append the monitored process' output to the file referenced by the future entity.

Parameters:
f - A future entity.

AppendToFileProcessOutputStrategy

public AppendToFileProcessOutputStrategy(FutureEntityFactory fef)
Create a process output strategy that will append the monitored process' output to the file referenced by a future entity created by the supplied factory.

Parameters:
fef - A factory for creating future entities.
Method Detail

getOutputListener

public ProcessOutputListener getOutputListener()
Description copied from interface: ProcessOutputStrategy
Create a new process output listener for listening to a process.

Specified by:
getOutputListener in interface ProcessOutputStrategy
Returns:
A new process output listener.