From b38654056be927b5b191ce8c8ae3c69ccbb7d8ff Mon Sep 17 00:00:00 2001 From: Simon Ebner Date: Fri, 4 Oct 2013 13:22:38 +0200 Subject: [PATCH] minor comments cleanup --- .../fda/core/actions/ChannelAccessPut.java | 11 ------- .../ch/psi/fda/core/actions/JythonAction.java | 11 ++----- .../ch/psi/fda/core/actions/ShellAction.java | 31 ++----------------- 3 files changed, 5 insertions(+), 48 deletions(-) diff --git a/ch.psi.fda/src/main/java/ch/psi/fda/core/actions/ChannelAccessPut.java b/ch.psi.fda/src/main/java/ch/psi/fda/core/actions/ChannelAccessPut.java index fec10df..e141947 100644 --- a/ch.psi.fda/src/main/java/ch/psi/fda/core/actions/ChannelAccessPut.java +++ b/ch.psi.fda/src/main/java/ch/psi/fda/core/actions/ChannelAccessPut.java @@ -34,7 +34,6 @@ import ch.psi.jcae.ChannelBeanFactory; */ public class ChannelAccessPut implements Action { - // Get Logger private static Logger logger = Logger.getLogger(ChannelAccessPut.class.getName()); /** @@ -89,9 +88,6 @@ public class ChannelAccessPut implements Action { this(channelName, value, false, null); } - /* (non-Javadoc) - * @see ch.psi.fda.core.Action#execute() - */ /** * @throws InterruptedException * @throws RuntimeException Cannot set value on channel @@ -117,20 +113,13 @@ public class ChannelAccessPut implements Action { } } - /* (non-Javadoc) - * @see ch.psi.fda.core.Action#abort() - */ @Override public void abort() { // This action cannot be aborted, therefore this method is not implemented } - /* (non-Javadoc) - * @see ch.psi.fda.core.Action#destroy() - */ @Override public void destroy() { - // Destroy channel try { logger.finest("Destroy action channel: "+channel.getName()); channel.destroy(); diff --git a/ch.psi.fda/src/main/java/ch/psi/fda/core/actions/JythonAction.java b/ch.psi.fda/src/main/java/ch/psi/fda/core/actions/JythonAction.java index fe8f670..f0aaa2e 100644 --- a/ch.psi.fda/src/main/java/ch/psi/fda/core/actions/JythonAction.java +++ b/ch.psi.fda/src/main/java/ch/psi/fda/core/actions/JythonAction.java @@ -39,8 +39,7 @@ import ch.psi.jcae.ChannelBean; import ch.psi.jcae.ChannelBeanFactory; /** - * @author ebner - * + * Executes a python script inside a Jython interpreter */ public class JythonAction implements Action { @@ -52,15 +51,9 @@ public class JythonAction implements Action { private static final String entryFunction = "process"; private static final String entryFunctionPattern = "def "+entryFunction+"\\((.*)\\):"; - /** - * Script engine of the manipulator - */ private ScriptEngine engine; - /** - * Jython entry call - */ - private String jythonCall; + private String jythonCall; // entry call to script - including all parameters, etc. private Map gvariables = new HashMap(); diff --git a/ch.psi.fda/src/main/java/ch/psi/fda/core/actions/ShellAction.java b/ch.psi.fda/src/main/java/ch/psi/fda/core/actions/ShellAction.java index b8ff396..817c16d 100644 --- a/ch.psi.fda/src/main/java/ch/psi/fda/core/actions/ShellAction.java +++ b/ch.psi.fda/src/main/java/ch/psi/fda/core/actions/ShellAction.java @@ -29,13 +29,11 @@ import java.util.logging.Logger; import ch.psi.fda.core.Action; /** - * Action that executes a specified script when it is executed. - * @author ebner + * Action that executes a specified command when it is executed. * */ public class ShellAction implements Action{ - // Get Logger private static Logger logger = Logger.getLogger(ShellAction.class.getName()); private volatile Process process; @@ -50,8 +48,7 @@ public class ShellAction implements Action{ private final String script; /** - * Constructor - * @param script Name of the script to execute when this action is invoked + * @param script Name of the command to execute when this action is invoked * * @throws IllegalArgumentException Specified script does not exist */ @@ -64,15 +61,6 @@ public class ShellAction implements Action{ this.script = script; } - /* (non-Javadoc) - * @see ch.psi.fda.core.Action#execute() - */ - /** - * @throws InterruptedException - * @throws RuntimeException Script did not exit with 0, - * Execution was interrupted, - * IO problem occurred - */ @Override public void execute() throws InterruptedException { try{ @@ -124,9 +112,7 @@ public class ShellAction implements Action{ @Override public void abort() { abort=true; - // This action cannot be aborted, therefore this function is not implemented. if(process!=null){ - // Terminate process via kill process.destroy(); } } @@ -135,30 +121,19 @@ public class ShellAction implements Action{ public void destroy() { } - /** - * @return the checkExitValue - */ + public boolean isCheckExitValue() { return checkExitValue; } - /** - * @param checkExitValue the checkExitValue to set - */ public void setCheckExitValue(boolean checkExitValue) { this.checkExitValue = checkExitValue; } - /** - * @return the exitValue - */ public int getExitValue() { return exitValue; } - /** - * @param exitValue the exitValue to set - */ public void setExitValue(int exitValue) { this.exitValue = exitValue; }