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 io.grpc.Server |
allocatePortAndCreate(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 io.grpc.Server |
create(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 |
createWithUrlFactory(ServerFactory.UrlFactory urlFactory)
Create a
ServerFactory that uses the given url factory. |
public static ServerFactory createDefault()
ServerFactory
.public static ServerFactory createWithUrlFactory(ServerFactory.UrlFactory urlFactory)
ServerFactory
that uses the given url factory.public abstract io.grpc.Server allocatePortAndCreate(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 io.grpc.Server create(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