/**
 *
 * Copyright (c) Microsoft Corporation. All rights reserved.
 * Licensed under the MIT License. See License.txt in the project root for license information.
 *
 */

package com.microsoft.azure;

import com.microsoft.rest.ServiceCall;
import com.microsoft.rest.ServiceCallback;

/**
 * Type representing a task in a task group {@link TaskGroup}.
 *
 * @param <U> the task result type
 */
public interface TaskItem<U> {
    /**
     * @return the result of the task execution
     */
    U result();

    /**
     * Executes the task.
     * <p>
     * once executed the result will be available through result getter
     *
     * @param taskGroup the task group dispatching tasks
     * @throws Exception exception
     */
    void execute(TaskGroup<U, TaskItem<U>> taskGroup, DAGNode<TaskItem<U>> node) throws Exception;

    ServiceCall executeAsync(TaskGroup<U, TaskItem<U>> taskGroup, DAGNode<TaskItem<U>> node, ServiceCallback<Void> callback);
}

@@ -680,16 +680,77 @@
 g tasks%0A
+     * @param node the node the task item is associated with%0A
      * @
@@ -884,16 +884,380 @@
 ption;%0A%0A
+    /**%0A     * Executes the task asynchronously.%0A     * %3Cp%3E%0A     * once executed the result will be available through result getter%0A%0A     * @param taskGroup the task group dispatching tasks%0A     * @param node the node the task item is associated with%0A     * @param callback callback to call on success or failure%0A     * @return the handle of the REST call%0A     */%0A
     Serv

Add applyAsync()