fulmine.util.concurrent
Interface ITaskExecutor

All Superinterfaces:
Executor, IDestroyable, ILifeCycle
All Known Implementing Classes:
TaskExecutor

public interface ITaskExecutor
extends Executor, ILifeCycle

An active object that executes tasks asynchronously.

Author:
Ramon Servadei

Method Summary
 void execute(Runnable task)
          Add the task to a queue for processing by a single thread
 StackTraceElement[] getStackTrace()
          Get the current stack of the executor
 void schedule(TimerTask task, long delay, long period)
          Schedule a timer task to be executed by a single worker thread.
 
Methods inherited from interface fulmine.ILifeCycle
isActive, start
 
Methods inherited from interface fulmine.IDestroyable
destroy
 

Method Detail

execute

void execute(Runnable task)
Add the task to a queue for processing by a single thread

Specified by:
execute in interface Executor
Parameters:
task - the task to add to a queue that is processed by a single thread

schedule

void schedule(TimerTask task,
              long delay,
              long period)
Schedule a timer task to be executed by a single worker thread.

Parameters:
task - task to be scheduled.
delay - delay in milliseconds before task is to be executed.
period - time in milliseconds between successive task executions.

getStackTrace

StackTraceElement[] getStackTrace()
Get the current stack of the executor

Returns:
the current stack of the executor
See Also:
Thread.getStackTrace()


Copyright © 2007-2009. All Rights Reserved.