public interface Task<T>
Runnable or Callable can be
submitted to TaskExecutor for execution but Task offer better
control during execution. A task intance can be submited to
TaskExecutor with preExecute and postExecute hooks defined, if
needed.| Modifier and Type | Method and Description |
|---|---|
T |
execute()
execution hook for this task and can possibly return a value
|
void |
postExecute()
Gets executed right after run method is finished executing
|
void |
preExecute()
Gets executed right before the run method is invoked.
|
void preExecute()
void postExecute()
T execute()
Copyright © 2019. All rights reserved.