public interface FnDataService
FnDataService
is able to forward inbound elements to a consumer and is also a
consumer of outbound elements. Callers can register themselves as consumers for inbound elements
or can get a handle for a consumer for outbound elements.Modifier and Type | Method and Description |
---|---|
<T> InboundDataClient |
receive(LogicalEndpoint inputLocation,
Coder<T> coder,
FnDataReceiver<T> listener)
Registers a receiver to be notified upon any incoming elements.
|
<T> CloseableFnDataReceiver<T> |
send(LogicalEndpoint outputLocation,
Coder<T> coder)
Deprecated.
Migrate to use
BeamFnDataOutboundAggregator directly for sending outbound
data. |
<T> InboundDataClient receive(LogicalEndpoint inputLocation, Coder<T> coder, FnDataReceiver<T> listener)
The provided coder is used to decode inbound elements. The decoded elements are passed to the provided receiver.
Any failure during decoding or processing of the element will put the InboundDataClient
into an error state such that InboundDataClient.awaitCompletion()
will throw an exception.
The provided receiver is not required to be thread safe.
@Deprecated <T> CloseableFnDataReceiver<T> send(LogicalEndpoint outputLocation, Coder<T> coder)
BeamFnDataOutboundAggregator
directly for sending outbound
data.The provided coder is used to encode elements on the outbound stream.
Closing the returned receiver signals the end of the stream.
The returned receiver is not thread safe.