Jadex 0.96-beta1

jadex.util.concurrent
Class AbstractExecutorService

java.lang.Object
  extended by jadex.util.concurrent.AbstractExecutorService
All Implemented Interfaces:
IExecutorService
Direct Known Subclasses:
AsyncExecutorService, SyncExecutorService

public abstract class AbstractExecutorService
extends Object
implements IExecutorService

The abstract executor service provides the generic functionality for suspending and resuming tasks.


Constructor Summary
AbstractExecutorService()
          Create a new abstract executor service.
 
Method Summary
 void cancel(IExecutable task)
          Cancel a task.
abstract  void doCancel(IExecutable task)
          Cancel the task execution.
abstract  void doExecute(IExecutable task)
          Execute the task as long as it indicates the execution should continue.
 void doResume(IExecutable task)
          Resume the task.
 void doSuspend(IExecutable task)
          Suspend the task.
 void execute(IExecutable task)
          Execute a task.
 boolean isShutdowned()
          Test if service is shutdowned.
 boolean isSuspended(IExecutable task)
          Test if a task is suspended.
 void resume(IExecutable task)
          Resume a task.
 void shutdown()
          Shutdown the executor service.
 void suspend(IExecutable task)
          Suspend a task.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface jadex.util.concurrent.IExecutorService
resume, suspend
 

Constructor Detail

AbstractExecutorService

public AbstractExecutorService()
Create a new abstract executor service.

Method Detail

execute

public void execute(IExecutable task)
Execute a task. Triggers the task to be executed in future.

Specified by:
execute in interface IExecutorService
Parameters:
task - The task to execute.

cancel

public void cancel(IExecutable task)
Cancel a task. Triggers the task to be not executed in future.

Specified by:
cancel in interface IExecutorService
Parameters:
task - The task to execute.

suspend

public void suspend(IExecutable task)
Suspend a task. The task will not be executed until resume is called.

Specified by:
suspend in interface IExecutorService
Parameters:
task - The task to execute.

resume

public void resume(IExecutable task)
Resume a task. Triggers the task to be not executed again.

Specified by:
resume in interface IExecutorService
Parameters:
task - The task to execute.

doSuspend

public void doSuspend(IExecutable task)
Suspend the task.


doResume

public void doResume(IExecutable task)
Resume the task.


isSuspended

public boolean isSuspended(IExecutable task)
Test if a task is suspended.

Returns:
True, if suspended.

shutdown

public void shutdown()
Shutdown the executor service.

Specified by:
shutdown in interface IExecutorService

isShutdowned

public boolean isShutdowned()
Test if service is shutdowned.

Returns:
True, if shutdowned.

doCancel

public abstract void doCancel(IExecutable task)
Cancel the task execution.


doExecute

public abstract void doExecute(IExecutable task)
Execute the task as long as it indicates the execution should continue.

Parameters:
task - The task to execute.

Jadex 0.96-beta1

Submit a bug or feature
For further API reference and developer documentation, see the Jadex User Guide and the Jadex Tutorial. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, and working code examples.

Copyright (C) 2002-2007 Lars Braubach, Alexander Pokahr - University of Hamburg. Use is subject to license terms.