org.jactr.core.module.asynch.delegate
Class AbstractAsynchronousModuleDelegate<M extends IAsynchronousModule,R>

java.lang.Object
  extended by org.jactr.core.module.asynch.delegate.AbstractAsynchronousModuleDelegate<M,R>
Type Parameters:
M -
R -
All Implemented Interfaces:
IAsynchronousModuleDelegate<M,R>
Direct Known Subclasses:
AbstractVocalDelegate

public abstract class AbstractAsynchronousModuleDelegate<M extends IAsynchronousModule,R>
extends java.lang.Object
implements IAsynchronousModuleDelegate<M,R>

abstract asynch delegate. This will manage the BlockingTimedEvent such that the synchronization will occurr minimumProcessingTime after the start of the request.

Author:
harrison

Constructor Summary
AbstractAsynchronousModuleDelegate(M module, double minimumProcessingTime, R cantProcessResult)
           
 
Method Summary
 double getMinimumProcessingTime()
           
 M getModule()
          get the module this is installed into
 java.util.concurrent.Future<R> process(IRequest request, double processTime, java.lang.Object... parameters)
          everything is based on a ChunkPattern.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractAsynchronousModuleDelegate

public AbstractAsynchronousModuleDelegate(M module,
                                          double minimumProcessingTime,
                                          R cantProcessResult)
Method Detail

getModule

public M getModule()
Description copied from interface: IAsynchronousModuleDelegate
get the module this is installed into

Specified by:
getModule in interface IAsynchronousModuleDelegate<M extends IAsynchronousModule,R>
Returns:

getMinimumProcessingTime

public double getMinimumProcessingTime()

process

public java.util.concurrent.Future<R> process(IRequest request,
                                              double processTime,
                                              java.lang.Object... parameters)
Description copied from interface: IAsynchronousModuleDelegate
everything is based on a ChunkPattern. This will start the processing and return some result, usually an IChunk

Specified by:
process in interface IAsynchronousModuleDelegate<M extends IAsynchronousModule,R>