THE PACKAGE JAVA.LANG
java.lang.Thread
20.20
20.20.15
public final void stop()
throws SecurityException
First, the
checkAccess
 method ( 20.20.12) of this
Thread
 object is called with
no arguments. This may result in throwing a
SecurityException
 (in the current
thread).
This thread is forced to complete abnormally whatever it was doing and to
throw a
ThreadDeath
 object as an exception. For this purpose, this thread is
resumed if it had been suspended, and is awakened if it had been asleep.
It is permitted to stop a thread that has not yet been started. If the thread is
eventually started, it will immediately terminate.
User code should not normally try to catch
ThreadDeath
 unless some
extraordinary cleanup operation is necessary (note that the process of throwing a
ThreadDeath
 exception
will
 cause
finally
 clauses of
try
 statements to be exe 
cuted before the thread officially dies). If a
catch
 clause does catch a
Thread 
Death
 object, it is important to rethrow the object so that the thread will actually
die. The top level error handler that reacts to otherwise uncaught exceptions will
not print a message or otherwise signal or notify the user if the uncaught excep 
tion is an instance of
ThreadDeath
.
20.20.16
public final void stop(Throwable thr)
throws SecurityException, NullPointerException
First, the
checkAccess
 method ( 20.20.12) of this
Thread
 object is called with
no arguments. This may result in throwing a
SecurityException
 (in the current
thread).
If the argument
thr
 is null, then a
NullPointerException
 is thrown (in the
current thread).
This thread is forced to complete abnormally whatever it was doing and to
throw the
Throwable
 object
thr
 as an exception. For this purpose, this thread is
resumed if it had been suspended, and is awakened if it had been asleep. This is an
unusual action to take; normally, the
stop
 method that takes no arguments
( 20.20.15) should be used.
It is permitted to stop a thread that has not yet been started. If the thread is
eventually started, it will immediately terminate.
595






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

java hosting

 

Our partners: PHP: Hypertext Preprocessor Best Web Hosting Java Web Hosting Inexpensive Web Hosting  Jsp Web Hosting

Cheapest Web Hosting Jsp Hosting Cheap Hosting

Visionwebhosting.net Business web hosting division of Web Design Plus. All rights reserved