org.curjent.example.agent.filecopy
Interface FileCopy


public interface FileCopy

File copy example using a listener to verify copies and report errors.

This example uses two types of agents, one for copying files and a second for verifying the copies. It uses a listener to implement an aspected-oriented design for detecting copy errors and initiating copy verification. This simplifies the copy task. Its only responsibility is to copy the contents of one file to another. The listener evaluates each copy operation's completion. If a copy operation throws an exception, the listener logs the error. If the copy succeeds, the listener calls the file verify agent to verify the results. The verify agent compares the original and copied files and reports the results.


Method Summary
 void copy(String source, String target)
           
 

Method Detail

copy

void copy(String source,
          String target)


Copyright 2009-2011 Tom Landon
Apache License 2.0