small changes before messingup with guice

This commit is contained in:
2013-10-03 16:19:09 +02:00
parent e723f66df3
commit 83dd7654ed
6 changed files with 24 additions and 35 deletions

View File

@@ -11,6 +11,11 @@
<artifactId>guava</artifactId>
<version>15.0</version>
</dependency>
<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
<version>3.0</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>

View File

@@ -155,7 +155,6 @@ public class Acquisition {
actionLoop = null;
collector = new Collector();
manipulations = new ArrayList<Manipulation>();
}

View File

@@ -0,0 +1,18 @@
package ch.psi.fda.aq;
import gov.aps.jca.CAException;
import ch.psi.jcae.ChannelBeanFactory;
import com.google.inject.AbstractModule;
public class AcquisitionModule extends AbstractModule {
@Override
protected void configure() {
try {
bind(ChannelBeanFactory.class).toInstance(ChannelBeanFactory.getFactory());
} catch (CAException e) {
throw new RuntimeException(e);
}
}
}

View File

@@ -28,14 +28,10 @@ import ch.psi.fda.core.Action;
*/
public class Delay implements Action {
/**
* Time to wait
*/
private final long time;
/**
* Constructor
* @param time Time to wait (in milliseconds)
* @param time Time to wait in milliseconds
*/
public Delay(long time){
@@ -47,28 +43,17 @@ public class Delay implements Action {
this.time = time;
}
/* (non-Javadoc)
* @see ch.psi.fda.core.Action#execute()
*/
@Override
public void execute() throws InterruptedException {
Thread.sleep(time);
}
/* (non-Javadoc)
* @see ch.psi.fda.core.Action#abort()
*/
@Override
public void abort() {
// Not implemented because not needed
}
/* (non-Javadoc)
* @see ch.psi.fda.core.Action#destroy()
*/
@Override
public void destroy() {
// Nothing to be done
}
}

View File

@@ -44,7 +44,6 @@ import ch.psi.jcae.ChannelBeanFactory;
*/
public class JythonAction implements Action {
// Get Logger
private static Logger logger = Logger.getLogger(JythonAction.class.getName());
/**
@@ -167,21 +166,13 @@ public class JythonAction implements Action {
}
}
/* (non-Javadoc)
* @see ch.psi.fda.core.Action#abort()
*/
@Override
public void abort() {
// TODO need to find a way to abort script execution
}
/* (non-Javadoc)
* @see ch.psi.fda.core.Action#destroy()
*/
@Override
public void destroy() {
// Nothing to be done
}
/**

View File

@@ -121,9 +121,6 @@ public class ShellAction implements Action{
}
}
/* (non-Javadoc)
* @see ch.psi.fda.core.Action#abort()
*/
@Override
public void abort() {
abort=true;
@@ -134,14 +131,8 @@ public class ShellAction implements Action{
}
}
/* (non-Javadoc)
* @see ch.psi.fda.core.Action#destroy()
*/
@Override
public void destroy() {
// Nothing to be done
}
/**