org.objectweb.dream.control.activity.task
Class Util

java.lang.Object
  extended byorg.objectweb.dream.control.activity.task.Util

public final class Util
extends Object

Provides utility functions to handle tasks.


Method Summary
static Component createScheduler(Scheduler scheduler, String taskName)
          Creates a scheduler.
static Component createTask(Task task, String controllerDesc)
          Creates a task.
static Component createThreadPoolTask(String taskName)
          Creates a thread pool task.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createTask

public static Component createTask(Task task,
                                   String controllerDesc)
                            throws InstantiationException
Creates a task.

Parameters:
task - an object implementing the Task interface.
controllerDesc - the name of the controller description.
Returns:
a component implementing the Task interface.
Throws:
InstantiationException - if an error occurs while creating the task.

createScheduler

public static Component createScheduler(Scheduler scheduler,
                                        String taskName)
                                 throws InstantiationException
Creates a scheduler.

Parameters:
scheduler - the object implementing the Scheduler interface.
taskName - the name of the thread pool task to create. May be null.
Returns:
a component implementing the Scheduler interface.
Throws:
InstantiationException - if an error occurs while creating the scheduler.

createThreadPoolTask

public static Component createThreadPoolTask(String taskName)
                                      throws InstantiationException
Creates a thread pool task.

Parameters:
taskName - the name of the thread pool task to create. May be null.
Returns:
a component interface of a thread pool task.
Throws:
InstantiationException - if an error occurs while creating the task.


Copyright © 2003, 2004 - INRIA Rhone-Alpes - All Rights Reserved.