Package org.apache.beam.sdk.fn.server
Class ServerFactory
- java.lang.Object
-
- org.apache.beam.sdk.fn.server.ServerFactory
-
- Direct Known Subclasses:
ServerFactory.InetSocketAddressServerFactory
public abstract class ServerFactory extends Object
AgRPC serverfactory.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classServerFactory.InetSocketAddressServerFactoryCreates agRPC Serverusing the default server factory.static interfaceServerFactory.UrlFactoryFactory that constructs client-accessible URLs from a local server address and port.
-
Constructor Summary
Constructors Constructor Description ServerFactory()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract org.apache.beam.vendor.grpc.v1p60p1.io.grpc.ServerallocateAddressAndCreate(List<org.apache.beam.vendor.grpc.v1p60p1.io.grpc.BindableService> services, org.apache.beam.model.pipeline.v1.Endpoints.ApiServiceDescriptor.Builder builder)Creates an instance of this server using an ephemeral address.abstract org.apache.beam.vendor.grpc.v1p60p1.io.grpc.Servercreate(List<org.apache.beam.vendor.grpc.v1p60p1.io.grpc.BindableService> services, org.apache.beam.model.pipeline.v1.Endpoints.ApiServiceDescriptor serviceDescriptor)Creates an instance of this server at the address specified by the given service descriptor and bound to multiple services.static ServerFactorycreateDefault()Create a defaultServerFactory.InetSocketAddressServerFactory.static ServerFactorycreateEpollDomainSocket()Create aServerFactory.EpollDomainSocket.static ServerFactorycreateEpollSocket()Create aServerFactory.EpollSocket.static ServerFactorycreateWithPortSupplier(Supplier<Integer> portSupplier)Create aServerFactory.InetSocketAddressServerFactorythat uses ports from a supplier.static ServerFactorycreateWithUrlFactory(ServerFactory.UrlFactory urlFactory)Create aServerFactory.InetSocketAddressServerFactorythat uses the given url factory.static ServerFactorycreateWithUrlFactoryAndPortSupplier(ServerFactory.UrlFactory urlFactory, Supplier<Integer> portSupplier)Create aServerFactory.InetSocketAddressServerFactorythat uses the given url factory and ports from a supplier.
-
-
-
Method Detail
-
createDefault
public static ServerFactory createDefault()
Create a defaultServerFactory.InetSocketAddressServerFactory.
-
createWithUrlFactory
public static ServerFactory createWithUrlFactory(ServerFactory.UrlFactory urlFactory)
Create aServerFactory.InetSocketAddressServerFactorythat uses the given url factory.
-
createWithPortSupplier
public static ServerFactory createWithPortSupplier(Supplier<Integer> portSupplier)
Create aServerFactory.InetSocketAddressServerFactorythat uses ports from a supplier.
-
createWithUrlFactoryAndPortSupplier
public static ServerFactory createWithUrlFactoryAndPortSupplier(ServerFactory.UrlFactory urlFactory, Supplier<Integer> portSupplier)
Create aServerFactory.InetSocketAddressServerFactorythat uses the given url factory and ports from a supplier.
-
createEpollSocket
public static ServerFactory createEpollSocket()
Create aServerFactory.EpollSocket.
-
createEpollDomainSocket
public static ServerFactory createEpollDomainSocket()
Create aServerFactory.EpollDomainSocket.
-
allocateAddressAndCreate
public abstract org.apache.beam.vendor.grpc.v1p60p1.io.grpc.Server allocateAddressAndCreate(List<org.apache.beam.vendor.grpc.v1p60p1.io.grpc.BindableService> services, org.apache.beam.model.pipeline.v1.Endpoints.ApiServiceDescriptor.Builder builder) throws IOException
Creates an instance of this server using an ephemeral address. The allocation of the address is server type dependent, which means the address may be a port for certain type of server, or a file path for other certain types. The chosen address is accessible to the caller from the URL set in the inputEndpoints.ApiServiceDescriptor.Builder. Server appliesGrpcContextHeaderAccessorProvider.interceptor()to all incoming requests.- Throws:
IOException
-
create
public abstract org.apache.beam.vendor.grpc.v1p60p1.io.grpc.Server create(List<org.apache.beam.vendor.grpc.v1p60p1.io.grpc.BindableService> services, org.apache.beam.model.pipeline.v1.Endpoints.ApiServiceDescriptor serviceDescriptor) throws IOException
Creates an instance of this server at the address specified by the given service descriptor and bound to multiple services. Server appliesGrpcContextHeaderAccessorProvider.interceptor()to all incoming requests.- Throws:
IOException
-
-