Language

The Free and Open Productivity Suite
Released: Apache OpenOffice 4.1.15
OOoRunner test harness

complexlib
Class MethodThread

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--complexlib.MethodThread
All Implemented Interfaces:
Runnable

public class MethodThread
extends Thread

Invoke a method of a class in an own thread. Provide a method to end the thread.


Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
MethodThread(Method testMethod, Object invokeClass, PrintWriter log)
          Constructor.
 
Method Summary
 void destroy()
          Stop the running method.
 String getErrorMessage()
          Get the error message
 boolean hasErrorMessage()
          Is there an error message?
 void run()
          Invoke the method.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, 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

MethodThread

public MethodThread(Method testMethod,
                    Object invokeClass,
                    PrintWriter log)
Constructor.
Parameters:
testMethod - The method that will be invoked.
invokeClass - The class where the method is invoked.
log - The logging mechanism.
Method Detail

run

public void run()
Invoke the method.
Overrides:
run in class Thread

getErrorMessage

public String getErrorMessage()
Get the error message
Returns:
The error message.

hasErrorMessage

public boolean hasErrorMessage()
Is there an error message?
Returns:
True, if an error did happen.

destroy

public void destroy()
Stop the running method.
Overrides:
destroy in class Thread

OOoRunner test harness

Apache Software Foundation

Copyright & License | Privacy | Contact Us | Donate | Thanks

Apache, OpenOffice, OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation. The Apache feather logo is a trademark of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.