gr.uoa.di.madgik.execution.engine
Class PlanExecutor

java.lang.Object
  extended by java.lang.Thread
      extended by gr.uoa.di.madgik.execution.engine.PlanExecutor
All Implemented Interfaces:
Runnable, Observer

public class PlanExecutor
extends Thread
implements Observer

This class manages the execution of an ExecutionPlan. Its role is to start in a background thread the execution of a plan and monitor its status until it is completed. Once the execution is completed, the instance removes it self from the list of PlanExecutors the engine references and cleans up any local files that are marked for cleanup in the plan.

Author:
gpapanikos

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
PlanExecutor(ExecutionHandle Handle)
          Instantiates a new plan executor.
 
Method Summary
 void Dispose()
          Unregisters itself from registered events, cleans up local files that are marked for cleanup in the plan and calls ExecutionHandle.Dispose()
 ExecutionHandle GetHandle()
          Gets the handle.
 void run()
           
 void update(Observable o, Object arg)
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PlanExecutor

public PlanExecutor(ExecutionHandle Handle)
Instantiates a new plan executor.

Parameters:
Handle - the handle
Method Detail

GetHandle

public ExecutionHandle GetHandle()
Gets the handle.

Returns:
the execution handle

run

public void run()
Specified by:
run in interface Runnable
Overrides:
run in class Thread

update

public void update(Observable o,
                   Object arg)
Specified by:
update in interface Observer

Dispose

public void Dispose()
Unregisters itself from registered events, cleans up local files that are marked for cleanup in the plan and calls ExecutionHandle.Dispose()



Copyright © 2012. All Rights Reserved.