Package com.ms.util |
![]() Previous |
![]() Contents |
![]() Index |
![]() Next |
public class Task { // Methods public static int schedule(Runnable runnable) public static int schedule(Runnable runnable, long when) public static int schedule(Runnable runnable, long when, boolean lightweight) public static boolean cancel(int id) }
Class for scheduling and managing the execution of runnable objects in the global task manager.
public static boolean cancel(int id)Cancels a pending runnable object.
Return Value:
Returns a boolean indicating whether the runnable was successfully cancelled. This value is false if the task was already run or had never been scheduled.
Parameter Description id An integer identifying the task.
public static int schedule(Runnable runnable)Schedules a runnable object to be run in the global task manager at the specified time.
Return Value:
Returns a non-zero integer identifying the task.
Parameter Description runnable The object to run.
public static int schedule(Runnable runnable, long when)Schedules a runnable object to be run in the global task manager at the specified time.
Return Value:
Returns a non-zero integer identifying the task.
Parameter Description runnable The object to run. when The time to run the object.
public static int schedule(Runnable runnable, long when, boolean lightweight)Schedules a runnable object to be run in the global task manager at the specified time.
Return Value:
Returns a non-zero integer identifying the task.
Parameter Description runnable The object to run. when The time to run the object. lightweight Whether to run the task as a lightweight task.
© 1997 Microsoft Corporation. All rights reserved. Legal Notices.