public abstract class ServerFactory
extends java.lang.Object
gRPC server
factory.Modifier and Type | Class and Description |
---|---|
static class |
ServerFactory.InetSocketAddressServerFactory
Creates a
gRPC Server using the default server factory. |
static interface |
ServerFactory.UrlFactory
Factory that constructs client-accessible URLs from a local server address and port.
|
Constructor and Description |
---|
ServerFactory() |
Modifier and Type | Method and Description |
---|---|
abstract org.apache.beam.vendor.grpc.v1_13_1.io.grpc.Server |
allocatePortAndCreate(org.apache.beam.vendor.grpc.v1_13_1.io.grpc.BindableService service,
org.apache.beam.model.pipeline.v1.Endpoints.ApiServiceDescriptor.Builder builder)
Creates an instance of this server using an ephemeral port chosen automatically.
|
abstract org.apache.beam.vendor.grpc.v1_13_1.io.grpc.Server |
create(org.apache.beam.vendor.grpc.v1_13_1.io.grpc.BindableService service,
org.apache.beam.model.pipeline.v1.Endpoints.ApiServiceDescriptor serviceDescriptor)
Creates an instance of this server at the address specified by the given service descriptor.
|
static ServerFactory |
createDefault()
Create a default
ServerFactory . |
static ServerFactory |
createWithPortSupplier(java.util.function.Supplier<java.lang.Integer> portSupplier)
Create a
ServerFactory that uses ports from a supplier. |
static ServerFactory |
createWithUrlFactory(ServerFactory.UrlFactory urlFactory)
Create a
ServerFactory that uses the given url factory. |
static ServerFactory |
createWithUrlFactoryAndPortSupplier(ServerFactory.UrlFactory urlFactory,
java.util.function.Supplier<java.lang.Integer> portSupplier)
Create a
ServerFactory that uses the given url factory and ports from a supplier. |
public static ServerFactory createDefault()
ServerFactory
.public static ServerFactory createWithUrlFactory(ServerFactory.UrlFactory urlFactory)
ServerFactory
that uses the given url factory.public static ServerFactory createWithPortSupplier(java.util.function.Supplier<java.lang.Integer> portSupplier)
ServerFactory
that uses ports from a supplier.public static ServerFactory createWithUrlFactoryAndPortSupplier(ServerFactory.UrlFactory urlFactory, java.util.function.Supplier<java.lang.Integer> portSupplier)
ServerFactory
that uses the given url factory and ports from a supplier.public abstract org.apache.beam.vendor.grpc.v1_13_1.io.grpc.Server allocatePortAndCreate(org.apache.beam.vendor.grpc.v1_13_1.io.grpc.BindableService service, org.apache.beam.model.pipeline.v1.Endpoints.ApiServiceDescriptor.Builder builder) throws java.io.IOException
Endpoints.ApiServiceDescriptor.Builder
. Server applies GrpcContextHeaderAccessorProvider.interceptor()
to all incoming requests.java.io.IOException
public abstract org.apache.beam.vendor.grpc.v1_13_1.io.grpc.Server create(org.apache.beam.vendor.grpc.v1_13_1.io.grpc.BindableService service, org.apache.beam.model.pipeline.v1.Endpoints.ApiServiceDescriptor serviceDescriptor) throws java.io.IOException
GrpcContextHeaderAccessorProvider.interceptor()
to all incoming
requests.java.io.IOException