/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.apache.beam.runners.fnexecution.control;

import org.apache.beam.sdk.fn.data.FnDataReceiver;
import org.apache.beam.sdk.util.WindowedValue;

/**
 * A bundle capable of handling input data elements for a
 * {@link org.apache.beam.model.fnexecution.v1.BeamFnApi.ProcessBundleDescriptor bundle descriptor}
 * by forwarding them to a remote environment for processing.
 *
 * <p>When a RemoteBundle is closed, it will block until bundle processing is finished on remote
 * resources, and throw an exception if bundle processing has failed.
 */
public interface RemoteBundle<InputT> extends AutoCloseable {
  /**
   * Get an id used to represent this bundle.
   */
  String getId();

  /**
   * Get a {@link FnDataReceiver receiver} which consumes input elements, forwarding them to the
   * remote environment.
   */
  FnDataReceiver<WindowedValue<InputT>> getInputReceiver();
}

@@ -1018,18 +1018,18 @@
 or a
-%0A *
  %7B@link
+%0A *
  org
@@ -1118,14 +1118,14 @@
 tor%7D
-%0A *
  by
+%0A *
  for
@@ -1414,29 +1414,24 @@
 able %7B%0A  /**
-%0A   *
  Get an id u
@@ -1459,19 +1459,16 @@
  bundle.
-%0A  
  */%0A  St
@@ -1616,16 +1616,16 @@
 .%0A   */%0A
-
   FnData
@@ -1675,11 +1675,444 @@
 eiver();
+%0A%0A  /**%0A   * %7B@inheritDoc%7D.%0A   *%0A   * %3Cp%3ECloses this bundle. This causes the input %7B@link FnDataReceiver%7D to be closed (future calls%0A   * to that %7B@link FnDataReceiver%7D will throw an exception), and causes the %7B@link RemoteBundle%7D to%0A   * produce any buffered outputs. The call to %7B@link #close()%7D will block until all of the outputs%0A   * produced by this bundle have been received.%0A   */%0A  @Override%0A  void close() throws Exception;
 %0A%7D%0A

Add extra documentation to RemoteBundle#close