Jadex 0.96-beta1

jadex.util.concurrent
Class SyncExecutorService

java.lang.Object
  extended by jadex.util.concurrent.AbstractExecutorService
      extended by jadex.util.concurrent.SyncExecutorService
All Implemented Interfaces:
IExecutorService

public class SyncExecutorService
extends AbstractExecutorService

The synchronous executor service that executes all tasks in one thread.


Constructor Summary
SyncExecutorService()
          Create a new synchronous executor service.
 
Method Summary
 void doCancel(IExecutable task)
          Cancel a task.
 void doExecute(IExecutable task)
          Execute a task in its own thread.
 void doSuspend(IExecutable task)
          Suspend the task.
 void resume()
          Resume all tasks.
 void shutdown()
          Shutdown the executor service.
 void suspend()
          Suspend all tasks.
 
Methods inherited from class jadex.util.concurrent.AbstractExecutorService
cancel, doResume, execute, isShutdowned, isSuspended, resume, suspend
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SyncExecutorService

public SyncExecutorService()
Create a new synchronous executor service.

Method Detail

doExecute

public void doExecute(IExecutable task)
Execute a task in its own thread.

Specified by:
doExecute in class AbstractExecutorService
Parameters:
task - The task to execute. (called from arbitrary threads)

doCancel

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

Specified by:
doCancel in class AbstractExecutorService
Parameters:
task - The task to execute.

doSuspend

public void doSuspend(IExecutable task)
Suspend the task.

Overrides:
doSuspend in class AbstractExecutorService
Parameters:
task - The task.

suspend

public void suspend()
Suspend all tasks. The tasks will not be executed until resume is called.


resume

public void resume()
Resume all tasks. Triggers the tasks to be not executed again.


shutdown

public void shutdown()
Shutdown the executor service.

Specified by:
shutdown in interface IExecutorService
Overrides:
shutdown in class AbstractExecutorService

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.