Class ForwardingListeningExecutorService

    • Method Detail

      • submit

        public <T> <T> task)
        Description copied from interface: 
        Submits a value-returning task for execution and returns a Future representing the pending results of the task. The Future's get method will return the task's result upon successful completion.

        If you would like to immediately block waiting for a task, you can use constructions of the form result = exec.submit(aCallable).get();

        Note: The class includes a set of methods that can convert some other common closure-like objects, for example, to form so they can be submitted.

        Specified by:
         in interface 
        Specified by:
        submit in interface ListeningExecutorService
        Overrides:
        submit in class ForwardingExecutorService
        Type Parameters:
        T - the type of the task's result
        Parameters:
        task - the task to submit
        Returns:
        a Future representing pending completion of the task
      • submit

        public  task)
        Description copied from interface: 
        Submits a Runnable task for execution and returns a Future representing that task. The Future's get method will return null upon successful completion.
        Specified by:
         in interface 
        Specified by:
        submit in interface ListeningExecutorService
        Overrides:
        submit in class ForwardingExecutorService
        Parameters:
        task - the task to submit
        Returns:
        a Future representing pending completion of the task
      • submit

        public <T>  task,
                                              T result)
        Description copied from interface: 
        Submits a Runnable task for execution and returns a Future representing that task. The Future's get method will return the given result upon successful completion.
        Specified by:
         in interface 
        Specified by:
        submit in interface ListeningExecutorService
        Overrides:
        submit in class ForwardingExecutorService
        Type Parameters:
        T - the type of the result
        Parameters:
        task - the task to submit
        result - the result to return
        Returns:
        a Future representing pending completion of the task