public abstract class DiscoveryClientConfiguration
extends io.micronaut.http.client.HttpClientConfiguration
DiscoveryClient
configurations.Constructor and Description |
---|
DiscoveryClientConfiguration()
Default constructor.
|
DiscoveryClientConfiguration(io.micronaut.runtime.ApplicationConfiguration applicationConfiguration) |
Modifier and Type | Method and Description |
---|---|
java.util.List<io.micronaut.discovery.ServiceInstance> |
getAllZones() |
java.util.Optional<java.lang.String> |
getContextPath() |
java.util.List<io.micronaut.discovery.ServiceInstance> |
getDefaultZone() |
abstract io.micronaut.discovery.DiscoveryConfiguration |
getDiscovery() |
java.lang.String |
getHost() |
int |
getPort() |
abstract io.micronaut.discovery.registration.RegistrationConfiguration |
getRegistration() |
java.util.Optional<java.lang.String> |
getServiceId() |
protected abstract java.lang.String |
getServiceID() |
boolean |
isSecure() |
boolean |
isShouldUseDns()
Whether DNS should be used to resolve the discovery servers.
|
void |
setContextPath(java.lang.String contextPath)
Sets the context path.
|
void |
setDefaultZone(java.util.List<java.net.URL> defaultZone)
Sets the Discovery servers to use for the default zone.
|
void |
setHost(java.lang.String host) |
void |
setPort(int port) |
void |
setSecure(boolean secure) |
void |
setShouldUseDns(boolean shouldUseDns)
Whether DNS should be used to resolve the discovery servers.
|
void |
setZones(java.util.Map<java.lang.String,java.util.List<java.net.URL>> zones)
Configures Discovery servers in other zones.
|
java.lang.String |
toString() |
getChannelOptions, getConnectionPoolConfiguration, getConnectTimeout, getConnectTtl, getDefaultCharset, getEventLoopGroup, getHttpVersion, getLoggerName, getLogLevel, getMaxContentLength, getNumOfThreads, getProxyAddress, getProxyPassword, getProxySelector, getProxyType, getProxyUsername, getReadIdleTimeout, getReadTimeout, getShutdownTimeout, getSslConfiguration, getThreadFactory, isExceptionOnErrorStatus, isFollowRedirects, resolveProxy, setChannelOptions, setConnectTimeout, setConnectTtl, setDefaultCharset, setEventLoopGroup, setExceptionOnErrorStatus, setFollowRedirects, setHttpVersion, setLoggerName, setLogLevel, setMaxContentLength, setNumOfThreads, setProxyAddress, setProxyPassword, setProxySelector, setProxyType, setProxyUsername, setReadIdleTimeout, setReadTimeout, setShutdownTimeout, setSslConfiguration, setThreadFactory
public DiscoveryClientConfiguration()
public DiscoveryClientConfiguration(io.micronaut.runtime.ApplicationConfiguration applicationConfiguration)
applicationConfiguration
- The application configuration.public boolean isShouldUseDns()
public void setShouldUseDns(boolean shouldUseDns)
shouldUseDns
- True if DNS should be used.public java.util.Optional<java.lang.String> getContextPath()
public void setContextPath(java.lang.String contextPath)
contextPath
- The context pathpublic java.util.Optional<java.lang.String> getServiceId()
public java.util.List<io.micronaut.discovery.ServiceInstance> getDefaultZone()
public void setDefaultZone(java.util.List<java.net.URL> defaultZone)
defaultZone
- The default zonepublic java.util.List<io.micronaut.discovery.ServiceInstance> getAllZones()
public void setZones(java.util.Map<java.lang.String,java.util.List<java.net.URL>> zones)
zones
- The zonespublic boolean isSecure()
public void setSecure(boolean secure)
secure
- Set if the discovery server is exposed over HTTPS@NonNull public java.lang.String getHost()
public void setHost(java.lang.String host)
host
- The Discovery server host namepublic int getPort()
public void setPort(int port)
port
- The port for the Discovery server@NonNull public abstract io.micronaut.discovery.DiscoveryConfiguration getDiscovery()
@Nullable public abstract io.micronaut.discovery.registration.RegistrationConfiguration getRegistration()
public java.lang.String toString()
toString
in class java.lang.Object
protected abstract java.lang.String getServiceID()
DiscoveryClient