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 void
configureSecurity
(InProcessServerBuilder builder) Configures the security options that should be used by the server.Gets the IP address the created server will be bound to.int
getPort()
Gets the local port the created server will use to listen to requests.protected InProcessServerBuilder
Creates 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:AbstractGrpcServerFactory
Creates a new server builder.- Specified by:
newServerBuilder
in classAbstractGrpcServerFactory<InProcessServerBuilder>
- Returns:
- The newly created server builder.
-
configureSecurity
Description copied from class:AbstractGrpcServerFactory
Configures the security options that should be used by the server.- Overrides:
configureSecurity
in classAbstractGrpcServerFactory<InProcessServerBuilder>
- Parameters:
builder
- The server builder to configure.
-
getAddress
Description copied from interface:GrpcServerFactory
Gets the IP address the created server will be bound to.- Specified by:
getAddress
in interfaceGrpcServerFactory
- Overrides:
getAddress
in classAbstractGrpcServerFactory<InProcessServerBuilder>
- Returns:
- The IP address the server will be bound to.
-
getPort
public int getPort()Description copied from interface:GrpcServerFactory
Gets the local port the created server will use to listen to requests.- Specified by:
getPort
in interfaceGrpcServerFactory
- Overrides:
getPort
in classAbstractGrpcServerFactory<InProcessServerBuilder>
- Returns:
- Gets the local port the server will use.
-