Clover coverage report -
Coverage timestamp: Mon May 5 2008 11:56:20 GMT-05:00
file stats: LOC: 44   Methods: 3
NCLOC: 23   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
FileCallback.java 0% 0% 0% 0%
coverage
 1    /*
 2    * To change this template, choose Tools | Templates
 3    * and open the template in the editor.
 4    */
 5    package org.proteomecommons.tranche.callbacks;
 6   
 7    import java.io.File;
 8   
 9    /**
 10    *
 11    * @author Augie Hill
 12    */
 13    public class FileCallback {
 14   
 15    private File file;
 16    private boolean isFinished = false;
 17   
 18    /**
 19    * Sends the caller.
 20    */
 21  0 public void sendFile(File file) {
 22  0 this.file = file;
 23  0 isFinished = true;
 24    }
 25   
 26    /**
 27    * A blocking method.
 28    */
 29  0 public File receiveFile() {
 30  0 while (!isFinished) {
 31  0 try {
 32  0 Thread.sleep(200);
 33    } catch (InterruptedException ex) {
 34    }
 35  0 Thread.yield();
 36    }
 37   
 38  0 return file;
 39    }
 40   
 41  0 public boolean isFinished() {
 42  0 return isFinished;
 43    }
 44    }