Class Tryer

  • All Implemented Interfaces:
    java.lang.Runnable

    public abstract class Tryer
    extends java.lang.Thread
    A wrapper process that tries to monitor if the execution of the abstract method toTry is blocked or not.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.lang.Thread

        java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
    • Field Summary

      • Fields inherited from class java.lang.Thread

        MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
    • Constructor Summary

      Constructors 
      Constructor Description
      Tryer()  
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Throwable getException()  
      void gimmeTime​(int ms)  
      boolean isBlocked()  
      boolean raisedException()  
      void run()  
      static void sleep​(int ms)  
      abstract void toTry()  
      • Methods inherited from class java.lang.Thread

        activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Tryer

        public Tryer()
    • Method Detail

      • isBlocked

        public boolean isBlocked()
      • raisedException

        public boolean raisedException()
      • getException

        public java.lang.Throwable getException()
      • sleep

        public static void sleep​(int ms)
      • gimmeTime

        public void gimmeTime​(int ms)
      • run

        public void run()
        Specified by:
        run in interface java.lang.Runnable
        Overrides:
        run in class java.lang.Thread
      • toTry

        public abstract void toTry()
                            throws java.lang.Throwable
        Throws:
        java.lang.Throwable