Interface GrpcConfig
- All Superinterfaces:
NamedService, ProtocolConfig, Prototype.Api
- All Known Implementing Classes:
GrpcConfig.BuilderBase.GrpcConfigImpl
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classFluent API builder forGrpcConfig.static classGrpcConfig.BuilderBase<BUILDER extends GrpcConfig.BuilderBase<BUILDER, PROTOTYPE>, PROTOTYPE extends GrpcConfig>Fluent API builder base forGrpcConfig. -
Method Summary
Modifier and TypeMethodDescriptionstatic GrpcConfig.Builderbuilder()Create a new fluent API builder to customize configuration.static GrpcConfig.Builderbuilder(GrpcConfig instance) Create a new fluent API builder from an existing instance.static GrpcConfigcreate()Create a new instance with default values.static GrpcConfigCreate a new instance from configuration.booleanWhether to support compression if requested by a client.booleanWhether to collect metrics for gRPC server calls.default List<GrpcServerService> gRPC server services.intMax size of gRPC reading buffer.name()Protocol configuration name.type()Protocol configuration type.Methods inherited from interface ProtocolConfig
enabled, transportBindingTypesModifier and TypeMethodDescriptiondefault booleanenabled()Whether this protocol configuration is enabled.Transport binding provider keys compatible with this protocol.
-
Method Details
-
builder
Create a new fluent API builder to customize configuration.- Returns:
- a new builder
-
builder
Create a new fluent API builder from an existing instance.- Parameters:
instance- an existing instance used as a base for the builder- Returns:
- a builder based on an instance
-
create
Create a new instance from configuration.- Parameters:
config- used to configure the new instance- Returns:
- a new instance configured from configuration
-
create
-
name
String name()Protocol configuration name.- Specified by:
namein interfaceNamedService- Returns:
- name of this configuration
-
type
String type()Protocol configuration type.- Specified by:
typein interfaceNamedService- Returns:
- type of this configuration
-
enableMetrics
boolean enableMetrics()Whether to collect metrics for gRPC server calls.- Returns:
- metrics flag
-
enableCompression
boolean enableCompression()Whether to support compression if requested by a client. If explicitly disabled, no compression will ever be used by the server even if a client-compatible compressor is found.- Returns:
- true if compression is enabled
-
grpcServices
gRPC server services. Services are discovered automatically by default.- Returns:
- services to use
-
maxReadBufferSize
int maxReadBufferSize()Max size of gRPC reading buffer. If receiving an entity larger than this, processing will be aborted. This can help prevent DoS attacks. Default set to 4 MB.- Returns:
- max read buffer size
-