Main Page | Namespace List | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

Thread.java

Go to the documentation of this file.
00001 /*!
00002  * @file Thread.java
00003  *
00004  * @brief Sample subset of @c @b java.lang.Thread native
00005  * methods
00006  *
00007  * The full implementation of this source file should contain each and
00008  * every native method that is declared by the implmentation and it
00009  * should be stored in a shared archive along with the other classes
00010  * of this Java package's native methods.
00011  *
00012  *
00013  * @section Control
00014  *
00015  * \$URL: https://svn.apache.org/path/name/Thread.java $ \$Id: Thread.java 0 09/28/2005 dlydick $
00016  *
00017  * Copyright 2005 The Apache Software Foundation
00018  * or its licensors, as applicable.
00019  *
00020  * Licensed under the Apache License, Version 2.0 ("the License");
00021  * you may not use this file except in compliance with the License.
00022  * You may obtain a copy of the License at
00023  *
00024  *     http://www.apache.org/licenses/LICENSE-2.0
00025  *
00026  * Unless required by applicable law or agreed to in writing,
00027  * software distributed under the License is distributed on an
00028  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
00029  * either express or implied.
00030  *
00031  * See the License for the specific language governing permissions
00032  * and limitations under the License.
00033  *
00034  * @version \$LastChangedRevision: 0 $
00035  *
00036  * @date \$LastChangedDate: 09/28/2005 $
00037  *
00038  * @author \$LastChangedBy: dlydick $
00039  *         Original code contributed by Daniel Lydick on 09/28/2005.
00040  *
00041  * @section Reference
00042  *
00043  */
00044 
00045 package java.lang;
00046 
00047 /*!
00048  * @brief Java class definition of @c @b java.lang.Thread,
00049  * the JVM thread model implementation class.
00050  *
00051  * The class @c @b java.lang.Thread contains fields methods that
00052  * implement the threading model for the JVM.  As a class that contains
00053  * @c @b native calls into the JVM, this stub sample
00054  * implementation is intended to be filled out into the complete
00055  * class definition.
00056  *
00057  */
00058 public class Thread
00059 {
00060     /*!
00061      * @brief Native definition
00062      * for @c @b java.lang.Thread.registerNatives()
00063      *
00064      * @verbatim
00065        Class:     java.lang.Thread
00066        Method:    registerNatives
00067        Signature: ()V
00068        @endverbatim
00069      *
00070      */
00071     native private static void registerNatives();
00072 
00073 
00074     /*!
00075      * @brief Native definition
00076      * for @c @b java.lang.Thread.unregisterNatives()
00077      *
00078      * @verbatim
00079        Class:     java.lang.Thread
00080        Method:    unregisterNatives
00081        Signature: ()V
00082        @endverbatim
00083      *
00084      */
00085     native private static void unregisterNatives();
00086 
00087 
00088     /*!
00089      * @brief Native definition
00090      * for @c @b java.lang.Thread.currentThread()
00091      *
00092      * @verbatim
00093        Class:     java.lang.Thread
00094        Method:    currentThread
00095        Signature: ()Ljava/lang/Thread;
00096        @endverbatim
00097      *
00098      */
00099     native public static Thread currentThread();
00100 
00101 
00102     /*!
00103      * @brief Native definition
00104      * for @c @b java.lang.Thread.yield()
00105      *
00106      * @verbatim
00107        Class:     java.lang.Thread
00108        Method:    yield
00109        Signature: ()V
00110        @endverbatim
00111      *
00112      */
00113     native public static void yield();
00114 
00115 
00116     /*!
00117      * @brief Native definition
00118      * for @c @b java.lang.Thread.interrupt()
00119      *
00120      * @verbatim
00121        Class:     java.lang.Thread
00122        Method:    interrupt
00123        Signature: ()V
00124        @endverbatim
00125      *
00126      */
00127     native public void interrupt();
00128 
00129 
00130     /*!
00131      * @brief Native definition
00132      * for @c @b java.lang.Thread.interrupted()
00133      *
00134      * @verbatim
00135        Class:     java.lang.Thread
00136        Method:    interrupted
00137        Signature: ()Z
00138        @endverbatim
00139      *
00140      */
00141     native public static boolean interrupted();
00142 
00143 
00144     /*!
00145      * @brief Native definition
00146      * for @c @b java.lang.Thread.isInterrupted()
00147      *
00148      * @verbatim
00149        Class:     java.lang.Thread
00150        Method:    isInterrupted
00151        Signature: ()Z
00152        @endverbatim
00153      *
00154      */
00155     native public boolean isInterrupted();
00156 
00157 
00158     /*!
00159      * @brief Native definition
00160      * for @c @b java.lang.Thread.sleep(long)
00161      *
00162      * @verbatim
00163        Class:     java.lang.Thread
00164        Method:    sleep
00165        Signature: (J)V
00166        @endverbatim
00167      *
00168      */
00169     native public static void sleep(long milliseconds);
00170 
00171 
00172     /*!
00173      * @brief Native definition
00174      * for <b><code>java.lang.Thread.sleep(long, int)</code></b>
00175      *
00176      * @verbatim
00177        Class:     java.lang.Thread
00178        Method:    sleep
00179        Signature: (JI)V
00180        @endverbatim
00181      *
00182      */
00183     native public static void sleep(long milliseconds, int nanoseconds);
00184 
00185 
00186     /*!
00187      * @brief Native definition
00188      * for @c @b java.lang.Thread.join()
00189      *
00190      * @verbatim
00191        Class:     java.lang.Thread
00192        Method:    join
00193        Signature: ()V
00194        @endverbatim
00195      *
00196      */
00197     native public void join();
00198 
00199 
00200     /*!
00201      * @brief Native definition
00202      * for @c @b java.lang.Thread.join(long)
00203      *
00204      * @verbatim
00205        Class:     java.lang.Thread
00206        Method:    join
00207        Signature: (J)V
00208        @endverbatim
00209      *
00210      */
00211     native public void join(long milliseconds);
00212 
00213 
00214     /*!
00215      * @brief Native definition
00216      * for @c @b java.lang.Thread.join()
00217      *
00218      * @verbatim
00219        Class:     java.lang.Thread
00220        Method:    join
00221        Signature: (JI)V
00222        @endverbatim
00223      *
00224      */
00225     native public void join(long milliseconds, int nanoseconds);
00226 
00227 
00228     /*!
00229      * @brief Native definition
00230      * for @c @b java.lang.Thread.isAlive()
00231      *
00232      * @verbatim
00233        Class:     java.lang.Thread
00234        Method:    isAlive
00235        Signature: ()Z
00236        @endverbatim
00237      *
00238      */
00239     native public boolean isAlive();
00240 
00241 
00242     /*!
00243      * @brief Native definition
00244      * for @c @b java.lang.Thread.start()
00245      *
00246      * @verbatim
00247        Class:     java.lang.Thread
00248        Method:    start
00249        Signature: ()V
00250        @endverbatim
00251      *
00252      */
00253     native public void start();
00254 
00255 
00256     /*!
00257      * @brief Native definition
00258      * for @c @b java.lang.Thread.countStackFrames()
00259      *
00260      * @verbatim
00261        Class:     java.lang.Thread
00262        Method:    countStackFrames
00263        Signature: ()I
00264        @endverbatim
00265      *
00266      */
00267     native public int countStackFrames();
00268 
00269 
00270     /*!
00271      * @brief Native definition
00272      * for @c @b java.lang.Thread.holdsLock()
00273      *
00274      * @verbatim
00275        Class:     java.lang.Thread
00276        Method:    holdsLock
00277        Signature: (Ljava/lang/Object;)Z
00278        @endverbatim
00279      *
00280      */
00281     native public static boolean holdsLock(Object object);
00282 
00283 
00284     /*!
00285      * @brief Native definition
00286      * for @c @b java.lang.Thread.setPriority()
00287      *
00288      * @verbatim
00289        Class:     java.lang.Thread
00290        Method:    setPriority
00291        Signature: (I)V
00292        @endverbatim
00293      *
00294      */
00295     native public void setPriority(int priority);
00296 
00297 
00298     /*!
00299      * @brief Native definition
00300      * for @c @b java.lang.Thread.getPriority()
00301      *
00302      * @verbatim
00303        Class:     java.lang.Thread
00304        Method:    getPriority
00305        Signature: ()I
00306        @endverbatim
00307      *
00308      */
00309     native public int getPriority();
00310 
00311 
00312     /*!
00313      * @brief Native definition
00314      * for @c @b java.lang.Thread.destroy()
00315      *
00316      * @verbatim
00317        Class:     java.lang.Thread
00318        Method:    destroy
00319        Signature: ()V
00320        @endverbatim
00321      *
00322      */
00323     native public void destroy();
00324 
00325 
00326     /*!
00327      * @brief Native definition
00328      * for @c @b java.lang.Thread.checkAccess()
00329      *
00330      * @verbatim
00331        Class:     java.lang.Thread
00332        Method:    checkAccess
00333        Signature: ()V
00334        @endverbatim
00335      *
00336      */
00337     native public void checkAccess();
00338 
00339 
00340     /*!
00341      * @brief Native definition
00342      * for @c @b java.lang.Thread.setDaemon()
00343      *
00344      * @verbatim
00345        Class:     java.lang.Thread
00346        Method:    setDaemon
00347        Signature: (Z)V
00348        @endverbatim
00349      *
00350      */
00351     native public void setDaemon(boolean isDaemon);
00352 
00353 
00354     /*!
00355      * @brief Native definition
00356      * for @c @b java.lang.Thread.isDaemon()
00357      *
00358      * @verbatim
00359        Class:     java.lang.Thread
00360        Method:    isDaemon
00361        Signature: ()Z
00362        @endverbatim
00363      *
00364      */
00365     native public boolean isDaemon();
00366 
00367 
00368     /*!
00369      * @brief Native definition
00370      * for @c @b java.lang.Thread.stop()
00371      *
00372      * @verbatim
00373        Class:     java.lang.Thread
00374        Method:    stop
00375        Signature: ()V
00376        @endverbatim
00377      *
00378      */
00379     native public void stop();
00380 
00381 
00382     /*!
00383      * @brief Native definition
00384      * for @c @b java.lang.Thread.suspend()
00385      *
00386      * @verbatim
00387        Class:     java.lang.Thread
00388        Method:    suspend
00389        Signature: ()V
00390        @endverbatim
00391      *
00392      */
00393     native public void suspend();
00394 
00395 
00396     /*!
00397      * @brief Native definition
00398      * for @c @b java.lang.Thread.resume()
00399      *
00400      * @verbatim
00401        Class:     java.lang.Thread
00402        Method:    resume
00403        Signature: ()V
00404        @endverbatim
00405      *
00406      */
00407     native public void resume();
00408 
00409 
00410 } /* END of java.lang.Thread */
00411 
00412 
00413 /* EOF */
00414 

Generated on Fri Sep 30 18:59:21 2005 by  doxygen 1.4.4