org.drools.concurrent
Class ExternalExecutorService.ObservableCallable<V>

java.lang.Object
  extended by org.drools.concurrent.ExternalExecutorService.ObservableCallable<V>
All Implemented Interfaces:
Callable<V>, ExternalExecutorService.ObservableTask
Enclosing class:
ExternalExecutorService

protected static final class ExternalExecutorService.ObservableCallable<V>
extends Object
implements Callable<V>, ExternalExecutorService.ObservableTask

This class is a wrapper around a Callable task that will notify a listener when the task starts executing and when it finishes executing.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.drools.concurrent.ExternalExecutorService.ObservableTask
ExternalExecutorService.ObservableTask.TaskType
 
Constructor Summary
ExternalExecutorService.ObservableCallable(Callable<V> delegate, ExternalExecutorService.TaskObserver handler)
           
 
Method Summary
 V call()
           
 void cancel()
          Prevents the execution of the ObservableTask if it did not started executing yet.
 ExternalExecutorService.ObservableTask.TaskType getType()
          Returns the type of this ObservableTask: either RUNNABLE or CALLABLE
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExternalExecutorService.ObservableCallable

public ExternalExecutorService.ObservableCallable(Callable<V> delegate,
                                                  ExternalExecutorService.TaskObserver handler)
Method Detail

call

public V call()
       throws Exception
Specified by:
call in interface Callable<V>
Throws:
Exception

getType

public ExternalExecutorService.ObservableTask.TaskType getType()
Description copied from interface: ExternalExecutorService.ObservableTask
Returns the type of this ObservableTask: either RUNNABLE or CALLABLE

Specified by:
getType in interface ExternalExecutorService.ObservableTask
Returns:

cancel

public void cancel()
Description copied from interface: ExternalExecutorService.ObservableTask
Prevents the execution of the ObservableTask if it did not started executing yet.

Specified by:
cancel in interface ExternalExecutorService.ObservableTask


Copyright © 2001-2013 JBoss Inc.. All Rights Reserved.