com.google.cloud.dataflow.sdk.runners.inprocess

## Class ForwardingPTransform<InputT extends PInput,OutputT extends POutput>

- java.lang.Object
- - com.google.cloud.dataflow.sdk.transforms.PTransform<InputT,OutputT>
  - - com.google.cloud.dataflow.sdk.runners.inprocess.ForwardingPTransform<InputT,OutputT>

All Implemented Interfaces:
  HasDisplayData, Serializable

    public abstract class ForwardingPTransform<InputT extends PInput,OutputT extends POutput>
    extends PTransform<InputT,OutputT>

A base class for implementing `PTransform` overrides, which behave identically to the delegate transform but with overridden methods. Implementors are required to implement `delegate()`, which returns the object to forward calls to, and `apply(PInput)`.

See Also:
  Serialized Form

### Field Summary

### Fields inherited from class com.google.cloud.dataflow.sdk.transforms.PTransform

`name`

### Constructor Summary

Constructors
Constructor and Description
`ForwardingPTransform()`

### Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods
`OutputT` `apply(InputT input)` Applies this `PTransform` on the given `InputT`, and returns its `Output`.
`protected abstract PTransform<InputT,OutputT>` `delegate()`
`<T> Coder<T>` `getDefaultOutputCoder(InputT input, TypedPValue<T> output)` Returns the default `Coder` to use for the given output of this single-output `PTransform` when applied to the given input.
`String` `getName()` Returns the transform name.
`void` `populateDisplayData(DisplayData.Builder builder)` Register display data for the given transform or component.
`void` `validate(InputT input)` Called before invoking apply (which may be intercepted by the runner) to verify this transform is fully specified and applicable to the specified input.

### Methods inherited from class com.google.cloud.dataflow.sdk.transforms.PTransform

`getDefaultOutputCoder, getDefaultOutputCoder, getKindString, toString`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### ForwardingPTransform

    public ForwardingPTransform()

### Method Detail

#### delegate

    protected abstract PTransform<InputT,OutputT> delegate()

#### apply

    public OutputT apply(InputT input)

Description copied from class: `PTransform`
Applies this `PTransform` on the given `InputT`, and returns its `Output`.

Composite transforms, which are defined in terms of other transforms, should return the output of one of the composed transforms. Non-composite transforms, which do not apply any transforms internally, should return a new unbound output and register evaluators (via backend-specific registration methods).

The default implementation throws an exception. A derived class must either implement apply, or else each runner must supply a custom implementation via `PipelineRunner.apply(com.google.cloud.dataflow.sdk.transforms.PTransform<InputT, OutputT>, InputT)`.

Overrides:
  `apply` in class `PTransform<InputT extends PInput,OutputT extends POutput>`

#### validate

    public void validate(InputT input)

Description copied from class: `PTransform`
Called before invoking apply (which may be intercepted by the runner) to verify this transform is fully specified and applicable to the specified input.

By default, does nothing.

Overrides:
  `validate` in class `PTransform<InputT extends PInput,OutputT extends POutput>`

#### getName

    public String getName()

Description copied from class: `PTransform`
Returns the transform name.

This name is provided by the transform creator and is not required to be unique.

Overrides:
  `getName` in class `PTransform<InputT extends PInput,OutputT extends POutput>`

#### getDefaultOutputCoder

    public <T> Coder<T> getDefaultOutputCoder(InputT input,
                                              TypedPValue<T> output)
                                       throws CannotProvideCoderException

Description copied from class: `PTransform`
Returns the default `Coder` to use for the given output of this single-output `PTransform` when applied to the given input.

Overrides:
  `getDefaultOutputCoder` in class `PTransform<InputT extends PInput,OutputT extends POutput>`
Throws:
  `CannotProvideCoderException` - if none can be inferred.

  By default, always throws.

#### populateDisplayData

    public void populateDisplayData(DisplayData.Builder builder)

Description copied from class: `PTransform`
Register display data for the given transform or component.

`populateDisplayData(DisplayData.Builder)` is invoked by Pipeline runners to collect display data via `DisplayData.from(HasDisplayData)`. Implementations may call `super.populateDisplayData(builder)` in order to register display data in the current namespace, but should otherwise use `subcomponent.populateDisplayData(builder)` to use the namespace of the subcomponent.

By default, does not register any display data. Implementors may override this method to provide their own display data.

Specified by:
  `populateDisplayData` in interface `HasDisplayData`
Overrides:
  `populateDisplayData` in class `PTransform<InputT extends PInput,OutputT extends POutput>`
Parameters:
  `builder` - The builder to populate with display data.
See Also:
  `HasDisplayData`