src/main/java/de/blau/android/util/ExecutorTask.java
/**
     * Starts execution of the task
     * 
     * @param input Data you want to work with in the background
     * @return this ExecutorTask
     */
Starts execution of the task

@param input Data you want to work with in the background
@return this ExecutorTask
Starts execution of the task @param input Data you want to work with in the background @return this ExecutorTask
public ExecutorTask<I, P, O> execute(final I input) {
        onPreExecute();
        outputFuture = executorService.submit(() -> {
            try {
                final O output = doInBackground(input);
                handler.post(() -> onPostExecute(output));
                return output;
            } catch (Exception e) {
                handler.post(() -> onBackgroundError(e));
                throw e;
            } finally {
                if (shutdown) {
                    executorService.shutdown();
                }
            }
        });
        return this;
    }
public ExecutorTask < I , P , O > execute ( final I input ) { onPreExecute ( ) ; outputFuture = executorService . submit ( ( ) -> { try { final O output = doInBackground ( input ) ; handler . post ( ( ) -> onPostExecute ( output ) ) ; return output ; } catch ( Exception e ) { handler . post ( ( ) -> onBackgroundError ( e ) ) ; throw e ; } finally { if ( shutdown ) { executorService . shutdown ( ) ; } } } ) ; return this ; }
Starts execution of the task
Starts execution of the task