small changes before messingup with guice
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -155,7 +155,6 @@ public class Acquisition {
|
||||
actionLoop = null;
|
||||
collector = new Collector();
|
||||
manipulations = new ArrayList<Manipulation>();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user