frysk.proc
Class ProcBlockAction

java.lang.Object
  extended by frysk.proc.ProcBlockAction

public class ProcBlockAction
extends Object

This class blocks all of the threads in a process and performs a given action defined by the method existingTask(Task task) on each task. Extensions of this class must implement existingTask(), and allExistingTasksCompleted() which is called when existingTask() has been called on all tasks.


Nested Class Summary
private  class ProcBlockAction.ProcBlockTaskObserver
           
 
Field Summary
private  ProcBlockObserver action
           
private static Log fine
           
private  boolean finished
           
private  boolean isMainTaskAdded
           
protected  Proc proc
           
private  LinkedList taskList
           
private  ProcBlockAction.ProcBlockTaskObserver taskObserver
           
private  LinkedList tasks
           
 
Constructor Summary
ProcBlockAction(File coreFile)
           
ProcBlockAction(int pid)
           
ProcBlockAction(Proc theProc, ProcBlockObserver action)
          Creates a ProcBlockAction which will attach to the given process stopping all of its tasks, performing the requested action on each task, and then removing itself.
 
Method Summary
private  void checkFinish(Task task)
           
private  void requestAdd()
           
private  void requestAddObservers(Task task)
           
private  void requestDelete()
           
private  void requestDeleteObservers(Task task)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fine

private static final Log fine

action

private ProcBlockObserver action

taskObserver

private ProcBlockAction.ProcBlockTaskObserver taskObserver

isMainTaskAdded

private boolean isMainTaskAdded

proc

protected Proc proc

tasks

private LinkedList tasks

taskList

private LinkedList taskList

finished

private boolean finished
Constructor Detail

ProcBlockAction

public ProcBlockAction(Proc theProc,
                       ProcBlockObserver action)
Creates a ProcBlockAction which will attach to the given process stopping all of its tasks, performing the requested action on each task, and then removing itself.

Parameters:
theProc - a non-null Process.

ProcBlockAction

public ProcBlockAction(int pid)

ProcBlockAction

public ProcBlockAction(File coreFile)
Method Detail

requestAdd

private void requestAdd()

requestAddObservers

private void requestAddObservers(Task task)

requestDeleteObservers

private void requestDeleteObservers(Task task)

requestDelete

private void requestDelete()

checkFinish

private void checkFinish(Task task)