com.kuka.common
Class ThreadInterruptedException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by com.kuka.common.ThreadInterruptedException
All Implemented Interfaces:
Serializable

public class ThreadInterruptedException
extends RuntimeException

Unchecked equivalent for InterruptedException.

See Also:
Serialized Form
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

Constructor Summary
ThreadInterruptedException()
          Default constructor.
ThreadInterruptedException(String message)
          Creates an instance of the class.
ThreadInterruptedException(String message, Throwable cause)
          Creates an instance of the class.
ThreadInterruptedException(Throwable cause)
          Creates an instance of the class.
 
Method Summary
static void checkInterrupted()
          Checks the interrupted flag of the current thread and throws a ThreadInterruptedException if the flag is set.
static void interruptAndThrow(InterruptedException e)
          Interrupts the current thread and throws the InterruptedException as a ThreadInterruptedException.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ThreadInterruptedException

public ThreadInterruptedException()
Default constructor.


ThreadInterruptedException

public ThreadInterruptedException(String message)
Creates an instance of the class.

Parameters:
message - exception message

ThreadInterruptedException

public ThreadInterruptedException(Throwable cause)
Creates an instance of the class.

Parameters:
cause - exception cause

ThreadInterruptedException

public ThreadInterruptedException(String message,
                                  Throwable cause)
Creates an instance of the class.

Parameters:
message - exception message
cause - exception cause
Method Detail

interruptAndThrow

public static void interruptAndThrow(InterruptedException e)
Interrupts the current thread and throws the InterruptedException as a ThreadInterruptedException.

Parameters:
e - the InterruptedException
Throws:
ThreadInterruptedException - always

checkInterrupted

public static void checkInterrupted()
Checks the interrupted flag of the current thread and throws a ThreadInterruptedException if the flag is set. The flag is unaffected by this method.

Throws:
ThreadInterruptedException - if the current thread has its interrupted flag set


Copyright © 2019. All rights reserved.