public class

ThreadService

extends Object
implements TaskServer
java.lang.Object
   ↳ com.sun.jmx.snmp.tasks.ThreadService

Class Overview

This class implements a TaskServer over a thread pool.

This API is a Sun Microsystems internal API and is subject to change without notice.

Summary

Public Constructors
ThreadService(int threadNumber)
Public Methods
void removeAll()
Runnable removeTask(Runnable task)
void submitTask(Runnable task)
Submit a task to be executed.
void submitTask(Task task)
Submit a task to be executed.
void terminate()
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.sun.jmx.snmp.tasks.TaskServer

Public Constructors

public ThreadService (int threadNumber)

Public Methods

public void removeAll ()

public Runnable removeTask (Runnable task)

public void submitTask (Runnable task)

Submit a task to be executed. This implementation of TaskServer uses a thread pool to execute the submitted tasks.

Parameters
task The task to be executed.
Throws
IllegalArgumentException if the submitted task is null.

public void submitTask (Task task)

Submit a task to be executed. Once a task is submitted, it is guaranteed that either task.run() or task.cancel() will be called. This implementation of TaskServer uses a thread pool to execute the submitted tasks.

Parameters
task The task to be executed.
Throws
IllegalArgumentException if the submitted task is null.

public void terminate ()