KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > jmx > snmp > tasks > TaskServer


1 // NPCTE fix for bugId 4510777, esc 532372, MR October 2001
2
// file TaskServer.java created for this bug fix
3

4 /*
5  * @(#)file TaskServer.java
6  * @(#)author Sun Microsystems, Inc.
7  * @(#)version 1.2
8  * @(#)date 01/10/03
9  *
10  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
11  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
12  */

13
14
15 package com.sun.jmx.snmp.tasks;
16
17 /**
18  * This interface is implemented by objects that are able to execute
19  * tasks. Whether the task is executed in the client thread or in another
20  * thread depends on the TaskServer implementation.
21  *
22  * <p><b>This API is a Sun Microsystems internal API and is subject
23  * to change without notice.</b></p>
24  * @see com.sun.jmx.snmp.tasks.Task
25  *
26  * @since 1.5
27  **/

28 public interface TaskServer {
29     /**
30      * Submit a task to be executed.
31      * Once a task is submitted, it is guaranteed that either
32      * {@link com.sun.jmx.snmp.tasks.Task#run() task.run()} or
33      * {@link com.sun.jmx.snmp.tasks.Task#cancel() task.cancel()} will be called.
34      * <p>Whether the task is executed in the client thread (e.g.
35      * <code>public void submitTask(Task task) { task.run(); }</code>) or in
36      * another thread (e.g. <code>
37      * public void submitTask(Task task) { new Thrad(task).start(); }</code>)
38      * depends on the TaskServer implementation.
39      * @param task The task to be executed.
40      **/

41     public void submitTask(Task task);
42 }
43
Popular Tags