net.groboclown.junit.jpda.v1
Class MainThreadHandler

java.lang.Object
  |
  +--net.groboclown.junit.jpda.v1.MainThreadHandler

public class MainThreadHandler
extends Object

Stores all knowledge of how to interact with the main thread for the AsyncTest.


Inner Class Summary
private  class MainThreadHandler.TDRListener
           
private  class MainThreadHandler.ThreadStartRequestListener
           
 
Field Summary
private  AsyncTestController controller
           
private  int foundThreads
           
private  MainThreadHandler.ThreadStartRequestListener listener
           
private static int MAX_FOUND_THREADS
           
private  ThreadReference thread
           
 
Constructor Summary
MainThreadHandler(AsyncTestController controller)
          Create a new handler for the main thread.
 
Method Summary
 void displayThread()
           
 TestThreadHandler findTestThread()
           
 StackFrame getMainStackFrame()
          Will never return null.
 Value invokeMethod(ObjectReference thisObject, Method method, List arguments, int options)
           
 boolean isThread(ThreadReference tr)
           
 void resume()
           
protected  void setupStart()
          Set up the main thread data for the beginning of the AsyncTest main() call.
 void suspend()
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

thread

private ThreadReference thread

controller

private AsyncTestController controller

foundThreads

private int foundThreads

MAX_FOUND_THREADS

private static final int MAX_FOUND_THREADS

listener

private MainThreadHandler.ThreadStartRequestListener listener
Constructor Detail

MainThreadHandler

public MainThreadHandler(AsyncTestController controller)
Create a new handler for the main thread.
Method Detail

findTestThread

public TestThreadHandler findTestThread()

getMainStackFrame

public StackFrame getMainStackFrame()
Will never return null.

invokeMethod

public Value invokeMethod(ObjectReference thisObject,
                          Method method,
                          List arguments,
                          int options)
                   throws Exception

suspend

public void suspend()

resume

public void resume()

isThread

public boolean isThread(ThreadReference tr)

displayThread

public void displayThread()

setupStart

protected void setupStart()
Set up the main thread data for the beginning of the AsyncTest main() call.


Written under the LGPL