Jadex 0.96-beta1

jadex.util.concurrent
Class AsyncManager

java.lang.Object
  extended by jadex.util.concurrent.AsyncManager

public class AsyncManager
extends Object

The async manager helps decoupling calls that should be executed on a separate thread. In async mode the own manager thread executes these calls asynchronously. In sync mode calls are directly executed on the caller thread. The method to be called for sync/async execution is execute(ICommand com, Object args)


Constructor Summary
AsyncManager(boolean async)
          Create a new async manager.
 
Method Summary
 void execute(ICommand com, Object args)
          Delegation method that invokes the command with the given args.
 boolean isAsync()
          Test in which mode the manager is running.
 void setAsync(boolean async)
          Set the async mode.
 void shutdown()
          Shutdown the manager.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AsyncManager

public AsyncManager(boolean async)
Create a new async manager.

Parameters:
async - True, for asynchronous execute calls.
Method Detail

execute

public void execute(ICommand com,
                    Object args)
Delegation method that invokes the command with the given args. In async mode the call will be executed on a the async manager thread.


isAsync

public boolean isAsync()
Test in which mode the manager is running.

Returns:
True, if in async mode.

setAsync

public void setAsync(boolean async)
Set the async mode.

Parameters:
async - True, for async mode.

shutdown

public void shutdown()
Shutdown the manager. No further execute calls are accepted via the manager. (Kills manager thread).


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.