public class ConcurrentExecutor extends Object implements ProgressDelegate
ProgressDelegate
,
Future
,
ConcurrentAdapter
Constructor and Description |
---|
ConcurrentExecutor(ConcurrentAdapter adapter)
Instantiates a new ConcurrentExecutor using specific ConcurrentAdapter
|
Modifier and Type | Method and Description |
---|---|
void |
cancel()
Interrupts the current service thread.
|
void |
done()
Executed when service thread is finished.
|
void |
execute(ConcurrentFeature concurrentFeature)
Creates and starts a new service thread.
|
void |
onException(Throwable ex)
Executed when service thread is finished with exception.
|
void |
setUpDelegate(ConcurrentExecutor executor,
ConcurrentFeature concurrentFeature,
ConcurrentAdapter adapter)
Set up and displays the ProgressDelegate.
|
void |
shutdown(boolean now)
Shutdowns thread pool.
|
void |
start()
Executed when service thread is started
|
public ConcurrentExecutor(ConcurrentAdapter adapter)
adapter
- the ConcurrentAdapterpublic void cancel()
public void done()
ProgressDelegate
done
in interface ProgressDelegate
public void execute(ConcurrentFeature concurrentFeature)
concurrentFeature
- the ConcurrentFeaturepublic void onException(Throwable ex)
ProgressDelegate
onException
in interface ProgressDelegate
ex
- the Throwablepublic void setUpDelegate(ConcurrentExecutor executor, ConcurrentFeature concurrentFeature, ConcurrentAdapter adapter)
ProgressDelegate
setUpDelegate
in interface ProgressDelegate
executor
- the ConcurrentExecutoconcurrentFeature
- the ConcurrentFeatureadapter
- the ConcurrentAdapterpublic void shutdown(boolean now)
now
- the nowpublic void start()
ProgressDelegate
start
in interface ProgressDelegate
Copyright © 2010-2020 Toolsverse. All Rights Reserved.