Interface JNIThreadProxy.Interruptable

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean postInterruptCheck​(boolean interruptStatus)
      Called AFTER native code calls Thread.interrupted() and allows the caller to override the returned value if desired.
      boolean preInterruptCheck()
      Called BEFORE native code calls Thread.interrupted().
    • Method Detail

      • preInterruptCheck

        boolean preInterruptCheck()
        Called BEFORE native code calls Thread.interrupted().

        Please note that this method can be called from any thread and it is the responsibility of the caller to ensure it is thread safe.

        Returns:
        true if the JNIThreadProxy should continue on an call Thread.interrupted(). false to stop processing now (and tell callers the thread is NOT interrupted).
      • postInterruptCheck

        boolean postInterruptCheck​(boolean interruptStatus)
        Called AFTER native code calls Thread.interrupted() and allows the caller to override the returned value if desired.
        Parameters:
        interruptStatus - The value returned by Thread.interrupted() on the current thread
        Returns:
        The value you actually want to return to native code. Allows you to override the value returned.