@ExperimentalApi(value="https://github.com/grpc/grpc-java/issues/1783") public final class InProcessChannelBuilder extends io.grpc.internal.AbstractManagedChannelImplBuilder<InProcessChannelBuilder>
The channel is intended to be fully-featured, high performance, and useful in testing.
For usage examples, see InProcessServerBuilder
.
Modifier and Type | Method and Description |
---|---|
protected io.grpc.internal.ClientTransportFactory |
buildTransportFactory() |
static InProcessChannelBuilder |
forAddress(String name,
int port)
Always fails.
|
static InProcessChannelBuilder |
forName(String name)
Create a channel builder that will connect to the server with the given name.
|
static InProcessChannelBuilder |
forTarget(String target)
Always fails.
|
InProcessChannelBuilder |
keepAliveTime(long keepAliveTime,
TimeUnit timeUnit)
Does nothing.
|
InProcessChannelBuilder |
keepAliveTimeout(long keepAliveTimeout,
TimeUnit timeUnit)
Does nothing.
|
InProcessChannelBuilder |
keepAliveWithoutCalls(boolean enable)
Does nothing.
|
InProcessChannelBuilder |
maxInboundMessageSize(int max) |
InProcessChannelBuilder |
scheduledExecutorService(ScheduledExecutorService scheduledExecutorService)
Provides a custom scheduled executor service.
|
InProcessChannelBuilder |
usePlaintext()
Does nothing.
|
InProcessChannelBuilder |
usePlaintext(boolean skipNegotiation)
Deprecated.
use
usePlaintext() instead. |
InProcessChannelBuilder |
useTransportSecurity()
Does nothing.
|
build, checkAuthority, compressorRegistry, decompressorRegistry, directExecutor, disableRetry, enableFullStreamDecompression, enableRetry, executor, getNameResolverParams, idleTimeout, intercept, intercept, loadBalancerFactory, maxHedgedAttempts, maxInboundMessageSize, maxRetryAttempts, maxTraceEvents, nameResolverFactory, overrideAuthority, overrideCensusStatsModule, perRpcBufferLimit, retryBufferSize, setBinaryLog, setStatsEnabled, setStatsRecordFinishedRpcs, setStatsRecordStartedRpcs, setTracingEnabled, userAgent
public static InProcessChannelBuilder forName(String name)
name
- the identity of the server to connect topublic static InProcessChannelBuilder forTarget(String target)
forName(java.lang.String)
instead.public static InProcessChannelBuilder forAddress(String name, int port)
forName(java.lang.String)
instead.public final InProcessChannelBuilder maxInboundMessageSize(int max)
maxInboundMessageSize
in class io.grpc.internal.AbstractManagedChannelImplBuilder<InProcessChannelBuilder>
public InProcessChannelBuilder useTransportSecurity()
useTransportSecurity
in class ManagedChannelBuilder<InProcessChannelBuilder>
@Deprecated public InProcessChannelBuilder usePlaintext(boolean skipNegotiation)
usePlaintext()
instead.usePlaintext
in class ManagedChannelBuilder<InProcessChannelBuilder>
skipNegotiation
- @{code true} if there is a priori knowledge that the endpoint supports
plaintext, false
if plaintext use must be negotiated.public InProcessChannelBuilder usePlaintext()
usePlaintext
in class ManagedChannelBuilder<InProcessChannelBuilder>
public InProcessChannelBuilder keepAliveTime(long keepAliveTime, TimeUnit timeUnit)
keepAliveTime
in class ManagedChannelBuilder<InProcessChannelBuilder>
public InProcessChannelBuilder keepAliveTimeout(long keepAliveTimeout, TimeUnit timeUnit)
keepAliveTimeout
in class ManagedChannelBuilder<InProcessChannelBuilder>
public InProcessChannelBuilder keepAliveWithoutCalls(boolean enable)
keepAliveWithoutCalls
in class ManagedChannelBuilder<InProcessChannelBuilder>
ManagedChannelBuilder.keepAliveTime(long, TimeUnit)
public InProcessChannelBuilder scheduledExecutorService(ScheduledExecutorService scheduledExecutorService)
It's an optional parameter. If the user has not provided a scheduled executor service when the channel is built, the builder will use a static cached thread pool.
@Internal protected io.grpc.internal.ClientTransportFactory buildTransportFactory()
buildTransportFactory
in class io.grpc.internal.AbstractManagedChannelImplBuilder<InProcessChannelBuilder>