Package io.grpc
Class NameResolver.Args.Builder
- java.lang.Object
-
- io.grpc.NameResolver.Args.Builder
-
- Enclosing class:
- NameResolver.Args
public static final class NameResolver.Args.Builder extends Object
Builder forNameResolver.Args
.- Since:
- 1.21.0
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NameResolver.Args
build()
Builds anNameResolver.Args
.NameResolver.Args.Builder
setChannelLogger(ChannelLogger channelLogger)
NameResolver.Args.Builder
setDefaultPort(int defaultPort)
NameResolver.Args.Builder
setMetricRecorder(io.grpc.MetricRecorder metricRecorder)
NameResolver.Args.Builder
setOffloadExecutor(Executor executor)
NameResolver.Args.Builder
setOverrideAuthority(String authority)
NameResolver.Args.Builder
setProxyDetector(ProxyDetector proxyDetector)
NameResolver.Args.Builder
setScheduledExecutorService(ScheduledExecutorService scheduledExecutorService)
NameResolver.Args.Builder
setServiceConfigParser(NameResolver.ServiceConfigParser parser)
NameResolver.Args.Builder
setSynchronizationContext(SynchronizationContext syncContext)
-
-
-
Method Detail
-
setDefaultPort
public NameResolver.Args.Builder setDefaultPort(int defaultPort)
SeeNameResolver.Args.getDefaultPort()
. This is a required field.- Since:
- 1.21.0
-
setProxyDetector
public NameResolver.Args.Builder setProxyDetector(ProxyDetector proxyDetector)
SeeNameResolver.Args.getProxyDetector()
. This is required field.- Since:
- 1.21.0
-
setSynchronizationContext
public NameResolver.Args.Builder setSynchronizationContext(SynchronizationContext syncContext)
SeeNameResolver.Args.getSynchronizationContext()
. This is a required field.- Since:
- 1.21.0
-
setScheduledExecutorService
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/6454") public NameResolver.Args.Builder setScheduledExecutorService(ScheduledExecutorService scheduledExecutorService)
-
setServiceConfigParser
public NameResolver.Args.Builder setServiceConfigParser(NameResolver.ServiceConfigParser parser)
SeeNameResolver.Args.getServiceConfigParser()
. This is a required field.- Since:
- 1.21.0
-
setChannelLogger
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/6438") public NameResolver.Args.Builder setChannelLogger(ChannelLogger channelLogger)
- Since:
- 1.26.0
-
setOffloadExecutor
public NameResolver.Args.Builder setOffloadExecutor(Executor executor)
SeeNameResolver.Args.getOffloadExecutor()
. This is an optional field.- Since:
- 1.25.0
-
setOverrideAuthority
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/9406") public NameResolver.Args.Builder setOverrideAuthority(String authority)
SeeNameResolver.Args.getOverrideAuthority()
. This is an optional field.- Since:
- 1.49.0
-
setMetricRecorder
public NameResolver.Args.Builder setMetricRecorder(io.grpc.MetricRecorder metricRecorder)
SeeNameResolver.Args.getMetricRecorder()
. This is an optional field.
-
build
public NameResolver.Args build()
Builds anNameResolver.Args
.- Since:
- 1.21.0
-
-