Rich variant of AsyncFunction. As a org.apache.flink.api.common.functions.RichFunction, it gives access to
the org.apache.flink.api.common.functions.RuntimeContext and provides setup and teardown methods.
State related apis in org.apache.flink.api.common.functions.RuntimeContext are not supported yet because the key
may get changed while accessing states in the working thread.
org.apache.flink.api.common.functions.IterationRuntimeContext#getIterationAggregator is not supported
since the aggregator may be modified by multiple threads.