The im4java Library, Version 1.4.0

org.im4java.process
Class ProcessTask

java.lang.Object
  extended by java.util.concurrent.FutureTask<ProcessEvent>
      extended by org.im4java.process.ProcessTask
All Implemented Interfaces:
java.lang.Runnable, java.util.concurrent.Future<ProcessEvent>, java.util.concurrent.RunnableFuture<ProcessEvent>

public class ProcessTask
extends java.util.concurrent.FutureTask<ProcessEvent>

This class represents a runnable process. It extends FutureTask so it can be used to query the result of an asynchronously run process.

Since:
1.1.0
Version:
$Revision: 1.2 $
Author:
$Author: bablokb $

Constructor Summary
ProcessTask(ProcessStarter pProcessStarter, java.util.LinkedList<java.lang.String> pArgs, ProcessEvent pProcessEvent)
          The constructor.
 
Method Summary
 boolean cancel(boolean mayInterruptIfRunning)
          
 ProcessStarter getProcessStarter()
          Query the ProcessStarter field of this ProcessTask.
 
Methods inherited from class java.util.concurrent.FutureTask
done, get, get, isCancelled, isDone, run, runAndReset, set, setException
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProcessTask

public ProcessTask(ProcessStarter pProcessStarter,
                   java.util.LinkedList<java.lang.String> pArgs,
                   ProcessEvent pProcessEvent)
The constructor.

Parameters:
pProcessStarter - The creating ProcessStarter
pArgs - Arguments for the process
pProcessEvent - The ProcessEvent for this ProcessTask
Method Detail

getProcessStarter

public ProcessStarter getProcessStarter()
Query the ProcessStarter field of this ProcessTask.

Returns:
the ProcessStarter which created this ProcessTask

cancel

public boolean cancel(boolean mayInterruptIfRunning)

Specified by:
cancel in interface java.util.concurrent.Future<ProcessEvent>
Overrides:
cancel in class java.util.concurrent.FutureTask<ProcessEvent>

The im4java Library, Version 1.4.0

Released under the LGPL, (c) Bernhard Bablok 2008-2010
Homepage: http://im4java.sourceforge.net/