Code example for Executor

Methods: execute

0
        execute(Thread.currentThread().getStackTrace());
    } 
 
    protected void execute( StackTraceElement[] launchLocation ) {
        this.launchLocation = launchLocation;
        executor.execute( future() );
    } 
 
    public boolean cancel( boolean mayInterruptIfRunning ) {
        if( future==null )
            throw new UnsupportedOperationException("You cannot cancel this task before calling future()");
 
        return future.cancel(mayInterruptIfRunning);
    } 
 
 
    /** 
     * @throws Exception, captured on passed to onException() if present. 
     */ 
    protected void onPreExecute() throws Exception {}