-
@ExperimentalApi(value = There is no plan to make this API stable, given transport API instability) public final class CronetChannelBuilder extends ForwardingChannelBuilder2<CronetChannelBuilder>
Convenience class for building channels with the cronet transport.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public abstract class
CronetChannelBuilder.StreamBuilderFactory
BidirectionalStream.Builder factory used for getting the gRPC BidirectionalStream.
-
Method Summary
Modifier and Type Method Description static CronetChannelBuilder
forAddress(String host, int port, CronetEngine cronetEngine)
Creates a new builder for the given server host, port and CronetEngine. static CronetChannelBuilder
forTarget(String target)
Always fails. static CronetChannelBuilder
forAddress(String name, int port)
Always fails. final CronetChannelBuilder
maxMessageSize(int maxMessageSize)
Sets the maximum message size allowed to be received on the channel. final CronetChannelBuilder
alwaysUsePut(boolean enable)
Sets the Cronet channel to always use PUT instead of POST. final CronetChannelBuilder
scheduledExecutorService(ScheduledExecutorService scheduledExecutorService)
Provides a custom scheduled executor service. -
Methods inherited from class io.grpc.ForwardingChannelBuilder2
addTransportFilter, build, compressorRegistry, decompressorRegistry, defaultLoadBalancingPolicy, defaultServiceConfig, directExecutor, disableRetry, disableServiceConfigLookUp, enableRetry, executor, forAddress, forTarget, idleTimeout, intercept, keepAliveTime, keepAliveTimeout, keepAliveWithoutCalls, maxHedgedAttempts, maxInboundMessageSize, maxInboundMetadataSize, maxRetryAttempts, maxTraceEvents, nameResolverFactory, offloadExecutor, overrideAuthority, perRpcBufferLimit, proxyDetector, retryBufferSize, setBinaryLog, toString, usePlaintext, useTransportSecurity, userAgent
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
forAddress
static CronetChannelBuilder forAddress(String host, int port, CronetEngine cronetEngine)
Creates a new builder for the given server host, port and CronetEngine.
-
forTarget
static CronetChannelBuilder forTarget(String target)
Always fails. Call forAddress instead.
-
forAddress
static CronetChannelBuilder forAddress(String name, int port)
Always fails. Call forAddress instead.
-
maxMessageSize
final CronetChannelBuilder maxMessageSize(int maxMessageSize)
Sets the maximum message size allowed to be received on the channel. If not called,defaults to DEFAULT_MAX_MESSAGE_SIZE.
-
alwaysUsePut
final CronetChannelBuilder alwaysUsePut(boolean enable)
Sets the Cronet channel to always use PUT instead of POST. Defaults to false.
-
scheduledExecutorService
final CronetChannelBuilder scheduledExecutorService(ScheduledExecutorService scheduledExecutorService)
Provides a custom scheduled executor service.
It's an optional parameter. If the user has not provided a scheduled executor service whenthe channel is built, the builder will use a static cached thread pool.
-
-
-
-