Class InProcessGrpcServerFactory
java.lang.Object
net.devh.boot.grpc.server.serverfactory.AbstractGrpcServerFactory<InProcessServerBuilder>
net.devh.boot.grpc.server.serverfactory.InProcessGrpcServerFactory
- All Implemented Interfaces:
GrpcServerFactory
Factory for in process grpc servers.
-
Field Summary
Fields inherited from class net.devh.boot.grpc.server.serverfactory.AbstractGrpcServerFactory
properties, serverConfigurers -
Constructor Summary
ConstructorsConstructorDescriptionInProcessGrpcServerFactory(String name, GrpcServerProperties properties) Creates a new in process server factory with the given properties.InProcessGrpcServerFactory(String name, GrpcServerProperties properties, List<GrpcServerConfigurer> serverConfigurers) Creates a new in process server factory with the given properties.InProcessGrpcServerFactory(GrpcServerProperties properties) Creates a new in process server factory with the given properties.InProcessGrpcServerFactory(GrpcServerProperties properties, List<GrpcServerConfigurer> serverConfigurers) Creates a new in process server factory with the given properties. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidconfigureSecurity(InProcessServerBuilder builder) Configures the security options that should be used by the server.Gets the IP address the created server will be bound to.intgetPort()Gets the local port the created server will use to listen to requests.protected InProcessServerBuilderCreates a new server builder.Methods inherited from class net.devh.boot.grpc.server.serverfactory.AbstractGrpcServerFactory
addService, configure, configureConnectionLimits, configureKeepAlive, configureLimits, configureServices, createServer
-
Constructor Details
-
InProcessGrpcServerFactory
Creates a new in process server factory with the given properties.- Parameters:
properties- The properties used to configure the server.
-
InProcessGrpcServerFactory
public InProcessGrpcServerFactory(GrpcServerProperties properties, List<GrpcServerConfigurer> serverConfigurers) Creates a new in process server factory with the given properties.- Parameters:
properties- The properties used to configure the server.serverConfigurers- The server configurers to use. Can be empty.
-
InProcessGrpcServerFactory
Creates a new in process server factory with the given properties.- Parameters:
name- The name of the in process server.properties- The properties used to configure the server.
-
InProcessGrpcServerFactory
public InProcessGrpcServerFactory(String name, GrpcServerProperties properties, List<GrpcServerConfigurer> serverConfigurers) Creates a new in process server factory with the given properties.- Parameters:
name- The name of the in process server.properties- The properties used to configure the server.serverConfigurers- The server configurers to use. Can be empty.
-
-
Method Details
-
newServerBuilder
Description copied from class:AbstractGrpcServerFactoryCreates a new server builder.- Specified by:
newServerBuilderin classAbstractGrpcServerFactory<InProcessServerBuilder>- Returns:
- The newly created server builder.
-
configureSecurity
Description copied from class:AbstractGrpcServerFactoryConfigures the security options that should be used by the server.- Overrides:
configureSecurityin classAbstractGrpcServerFactory<InProcessServerBuilder>- Parameters:
builder- The server builder to configure.
-
getAddress
Description copied from interface:GrpcServerFactoryGets the IP address the created server will be bound to.- Specified by:
getAddressin interfaceGrpcServerFactory- Overrides:
getAddressin classAbstractGrpcServerFactory<InProcessServerBuilder>- Returns:
- The IP address the server will be bound to.
-
getPort
public int getPort()Description copied from interface:GrpcServerFactoryGets the local port the created server will use to listen to requests.- Specified by:
getPortin interfaceGrpcServerFactory- Overrides:
getPortin classAbstractGrpcServerFactory<InProcessServerBuilder>- Returns:
- Gets the local port the server will use.
-