mk.fsgrep.util.thread
Class ThreadRunner

java.lang.Object
  extended by mk.fsgrep.util.thread.ThreadRunner
All Implemented Interfaces:
java.lang.Runnable

public class ThreadRunner
extends java.lang.Object
implements java.lang.Runnable

Execute a runnable in a new thread and then trigger a callback when finished.

Author:
Murali Krishnan

Constructor Summary
ThreadRunner(java.lang.String pName, RunCallback pCallback)
           
 
Method Summary
 void execute(java.lang.Runnable runnable)
           
 java.lang.Runnable getAction()
           
 RunCallback getCallback()
           
 java.lang.String getName()
           
 java.lang.Thread getThread()
           
 void run()
           
 void setAction(java.lang.Runnable val)
           
 void setThread(java.lang.Thread val)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ThreadRunner

public ThreadRunner(java.lang.String pName,
                    RunCallback pCallback)
Method Detail

getName

public java.lang.String getName()

getCallback

public RunCallback getCallback()

getThread

public java.lang.Thread getThread()

getAction

public java.lang.Runnable getAction()

setThread

public void setThread(java.lang.Thread val)

setAction

public void setAction(java.lang.Runnable val)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

execute

public void execute(java.lang.Runnable runnable)

run

public void run()
Specified by:
run in interface java.lang.Runnable


Copyright © 2009. All Rights Reserved.