0N/A/*
2362N/A * Copyright (c) 1994, 2005, Oracle and/or its affiliates. All rights reserved.
0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A *
0N/A * This code is free software; you can redistribute it and/or modify it
0N/A * under the terms of the GNU General Public License version 2 only, as
2362N/A * published by the Free Software Foundation. Oracle designates this
0N/A * particular file as subject to the "Classpath" exception as provided
2362N/A * by Oracle in the LICENSE file that accompanied this code.
0N/A *
0N/A * This code is distributed in the hope that it will be useful, but WITHOUT
0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A * version 2 for more details (a copy is included in the LICENSE file that
0N/A * accompanied this code).
0N/A *
0N/A * You should have received a copy of the GNU General Public License version
0N/A * 2 along with this work; if not, write to the Free Software Foundation,
0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A *
2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2362N/A * or visit www.oracle.com if you need additional information or have any
2362N/A * questions.
0N/A */
0N/A
0N/Apackage java.lang;
0N/A
0N/A/**
0N/A * The <code>Runnable</code> interface should be implemented by any
0N/A * class whose instances are intended to be executed by a thread. The
0N/A * class must define a method of no arguments called <code>run</code>.
0N/A * <p>
0N/A * This interface is designed to provide a common protocol for objects that
0N/A * wish to execute code while they are active. For example,
0N/A * <code>Runnable</code> is implemented by class <code>Thread</code>.
0N/A * Being active simply means that a thread has been started and has not
0N/A * yet been stopped.
0N/A * <p>
0N/A * In addition, <code>Runnable</code> provides the means for a class to be
0N/A * active while not subclassing <code>Thread</code>. A class that implements
0N/A * <code>Runnable</code> can run without subclassing <code>Thread</code>
0N/A * by instantiating a <code>Thread</code> instance and passing itself in
0N/A * as the target. In most cases, the <code>Runnable</code> interface should
0N/A * be used if you are only planning to override the <code>run()</code>
0N/A * method and no other <code>Thread</code> methods.
0N/A * This is important because classes should not be subclassed
0N/A * unless the programmer intends on modifying or enhancing the fundamental
0N/A * behavior of the class.
0N/A *
0N/A * @author Arthur van Hoff
0N/A * @see java.lang.Thread
0N/A * @see java.util.concurrent.Callable
0N/A * @since JDK1.0
0N/A */
0N/Apublic
0N/Ainterface Runnable {
0N/A /**
0N/A * When an object implementing interface <code>Runnable</code> is used
0N/A * to create a thread, starting the thread causes the object's
0N/A * <code>run</code> method to be called in that separately executing
0N/A * thread.
0N/A * <p>
0N/A * The general contract of the method <code>run</code> is that it may
0N/A * take any action whatsoever.
0N/A *
0N/A * @see java.lang.Thread#run()
0N/A */
0N/A public abstract void run();
0N/A}