public abstract class OutboundObserverFactory
extends java.lang.Object
StreamObserver
implementation to use in
to interact with fn execution APIs.Modifier and Type | Class and Description |
---|---|
static interface |
OutboundObserverFactory.BasicFactory<ReqT,RespT>
Creates an outbound observer for the given inbound observer.
|
Constructor and Description |
---|
OutboundObserverFactory() |
Modifier and Type | Method and Description |
---|---|
static OutboundObserverFactory |
clientBuffered(java.util.concurrent.ExecutorService executorService)
Create a buffering
OutboundObserverFactory for client-side RPCs with the specified
ExecutorService and the default buffer size. |
static OutboundObserverFactory |
clientBuffered(java.util.concurrent.ExecutorService executorService,
int bufferSize)
Create a buffering
OutboundObserverFactory for client-side RPCs with the specified
ExecutorService and buffer size. |
static OutboundObserverFactory |
clientDirect()
Create the default
OutboundObserverFactory for client-side RPCs, which uses basic
unbuffered flow control and adds synchronization to provide thread safety of access to the
returned observer. |
abstract <ReqT,RespT> |
outboundObserverFor(OutboundObserverFactory.BasicFactory<ReqT,RespT> baseOutboundObserverFactory,
org.apache.beam.vendor.grpc.v1p13p1.io.grpc.stub.StreamObserver<ReqT> inboundObserver)
Creates an outbound observer for the given inbound observer by potentially inserting hooks into
the inbound and outbound observers.
|
static OutboundObserverFactory |
serverDirect()
Like
clientDirect() but for server-side RPCs. |
static OutboundObserverFactory |
trivial()
Creates an
OutboundObserverFactory that simply delegates to the base factory, with no
flow control or synchronization. |
public static OutboundObserverFactory clientBuffered(java.util.concurrent.ExecutorService executorService)
OutboundObserverFactory
for client-side RPCs with the specified
ExecutorService
and the default buffer size.public static OutboundObserverFactory clientBuffered(java.util.concurrent.ExecutorService executorService, int bufferSize)
OutboundObserverFactory
for client-side RPCs with the specified
ExecutorService
and buffer size.public static OutboundObserverFactory clientDirect()
OutboundObserverFactory
for client-side RPCs, which uses basic
unbuffered flow control and adds synchronization to provide thread safety of access to the
returned observer.public static OutboundObserverFactory serverDirect()
clientDirect()
but for server-side RPCs.public static OutboundObserverFactory trivial()
OutboundObserverFactory
that simply delegates to the base factory, with no
flow control or synchronization. Not recommended for use except in tests.public abstract <ReqT,RespT> org.apache.beam.vendor.grpc.v1p13p1.io.grpc.stub.StreamObserver<RespT> outboundObserverFor(OutboundObserverFactory.BasicFactory<ReqT,RespT> baseOutboundObserverFactory, org.apache.beam.vendor.grpc.v1p13p1.io.grpc.stub.StreamObserver<ReqT> inboundObserver)
baseOutboundObserverFactory
- A base function to create an outbound observer from an
inbound observer.inboundObserver
- The inbound observer.