Interrupts this thread.
Unless the current thread is interrupting itself, which is
always permitted, the
#checkAccess() method
of this thread is invoked, which may cause a
SecurityException to be thrown.
If this thread is blocked in an invocation of the
Object#wait(),
Object#wait(long), or
Object#wait(long,int) methods of the
Objectclass, or of the
#join(),
#join(long),
#join(long,int),
#sleep(long), or
#sleep(long,int),
methods of this class, then its interrupt status will be cleared and it
will receive an
InterruptedException.
If this thread is blocked in an I/O operation upon an
java.nio.channels.InterruptibleChannel then the channel will be closed, the thread's interrupt
status will be set, and the thread will receive a
java.nio.channels.ClosedByInterruptException.
If this thread is blocked in a
java.nio.channels.Selectorthen the thread's interrupt status will be set and it will return
immediately from the selection operation, possibly with a non-zero
value, just as if the selector's
java.nio.channels.Selector#wakeup method were invoked.
If none of the previous conditions hold then this thread's interrupt
status will be set.