Javadoc
Signed-off-by: Emmanuel Bigeon <emmanuel@bigeon.fr>
This commit is contained in:
parent
99134c1831
commit
31ad72567a
@ -69,6 +69,8 @@ package net.bigeon.gclc.process;
|
|||||||
* #L%
|
* #L%
|
||||||
*/
|
*/
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.logging.Level;
|
||||||
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
import net.bigeon.gclc.command.CommandParameters;
|
import net.bigeon.gclc.command.CommandParameters;
|
||||||
import net.bigeon.gclc.command.ParametrizedCommand;
|
import net.bigeon.gclc.command.ParametrizedCommand;
|
||||||
@ -92,28 +94,30 @@ import net.bigeon.gclc.manager.ConsoleOutput;
|
|||||||
* @author Emmanuel Bigeon */
|
* @author Emmanuel Bigeon */
|
||||||
public class CommandForeground extends ParametrizedCommand {
|
public class CommandForeground extends ParametrizedCommand {
|
||||||
|
|
||||||
|
/** The class logger. */
|
||||||
|
private static final Logger LOGGER = Logger
|
||||||
|
.getLogger(CommandForeground.class.getName());
|
||||||
|
/** The task pool to fetch task from. */
|
||||||
private final TaskPool pool;
|
private final TaskPool pool;
|
||||||
|
|
||||||
/** Add the fork command.
|
/** Add the fork command.
|
||||||
*
|
*
|
||||||
* @param name the command name
|
* @param name the command name
|
||||||
* @param pool The pool to get joinable tasks from */
|
* @param pool The pool to get joinable tasks from */
|
||||||
public CommandForeground(final String name, TaskPool pool) {
|
public CommandForeground(final String name, final TaskPool pool) {
|
||||||
super(name, false);
|
super(name, false);
|
||||||
this.pool = pool;
|
this.pool = pool;
|
||||||
addParameters();
|
addParameters();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** Add the parameters of the command. */
|
||||||
*
|
|
||||||
*/
|
|
||||||
private void addParameters() {
|
private void addParameters() {
|
||||||
try {
|
try {
|
||||||
addStringParameter("pid", false);
|
addStringParameter("pid", false);
|
||||||
addStringParameter("delai", false);
|
addStringParameter("delai", false);
|
||||||
} catch (final InvalidParameterException e) {
|
} catch (final InvalidParameterException e) {
|
||||||
// TODO Auto-generated catch block
|
// Cannot be reached unless GCLC base framework has an error
|
||||||
e.printStackTrace();
|
LOGGER.log(Level.SEVERE, "unexpected parameter error!", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -68,7 +68,7 @@ package net.bigeon.gclc.process;
|
|||||||
* knowledge of the CeCILL license and that you accept its terms.
|
* knowledge of the CeCILL license and that you accept its terms.
|
||||||
* #L%
|
* #L%
|
||||||
*/
|
*/
|
||||||
/** A listener for interruption
|
/** A listener for interruption.
|
||||||
*
|
*
|
||||||
* @author Emmanuel Bigeon */
|
* @author Emmanuel Bigeon */
|
||||||
public interface InterruptionListener {
|
public interface InterruptionListener {
|
||||||
|
@ -0,0 +1,8 @@
|
|||||||
|
/** Connecting Input and Output related classes.
|
||||||
|
* <p>
|
||||||
|
* This package groups the Connecting classes that are used to be able to put
|
||||||
|
* the tasks in background and foreground and reattach the actual console input
|
||||||
|
* and outputs to the tasks' ones.
|
||||||
|
*
|
||||||
|
* @author Emmanuel Bigeon */
|
||||||
|
package net.bigeon.gclc.process.io;
|
@ -0,0 +1,14 @@
|
|||||||
|
/** This package defines elements for processes inside a console application.
|
||||||
|
* <p>
|
||||||
|
* Processes are tasks that are run in background of the application. One may
|
||||||
|
* want to temporarily connect to such a task (through
|
||||||
|
* {@link net.bigeon.gclc.process.CommandForeground}), or verify it's actual
|
||||||
|
* running status (through {@link net.bigeon.gclc.process.ProcessList}. One may
|
||||||
|
* also want to start such a process (through
|
||||||
|
* {@link net.bigeon.gclc.process.ForkCommandTask}) or close it (through
|
||||||
|
* {@link net.bigeon.gclc.process.ProcessKill}).
|
||||||
|
* <p>
|
||||||
|
* The task list can be managed by several commands to list or clear it.
|
||||||
|
*
|
||||||
|
* @author Emmanuel Bigeon */
|
||||||
|
package net.bigeon.gclc.process;
|
Loading…
Reference in New Issue
Block a user