org.drools.concurrent
Class ExternalExecutorService.ObservableCallable<V>
java.lang.Object
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.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ExternalExecutorService.ObservableCallable
public ExternalExecutorService.ObservableCallable(Callable<V> delegate,
ExternalExecutorService.TaskObserver handler)
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-2012 JBoss by Red Hat. All Rights Reserved.