| Modifier and Type | Method | Description |
|---|---|---|
static Consultant.Builder |
Consultant.builder() |
|
Consultant.Builder |
Consultant.Builder.identifyAs(String serviceName) |
States the identify of this application.
|
Consultant.Builder |
Consultant.Builder.identifyAs(String serviceName,
String datacenter) |
States the identify of this application.
|
Consultant.Builder |
Consultant.Builder.identifyAs(String serviceName,
String datacenter,
String hostname) |
States the identify of this application.
|
Consultant.Builder |
Consultant.Builder.identifyAs(String serviceName,
String datacenter,
String hostname,
String instanceName) |
States the identify of this application.
|
Consultant.Builder |
Consultant.Builder.onSettingUpdate(String key,
SettingListener listener) |
Specifies a callback listener which is notified of whenever the specified setting is updated.
|
Consultant.Builder |
Consultant.Builder.onValidConfig(ConfigListener listener) |
Specifies a callback listener which is notified of whenever a new and valid configuration is detected
in Consul.
|
Consultant.Builder |
Consultant.Builder.pullConfigFromConsul(boolean pullConfig) |
Specifies that Consultant should or should not fetch configuration from Consul.
|
Consultant.Builder |
Consultant.Builder.setHealthEndpoint(String endpoint) |
States the endpoint used for checking the service's health.
|
Consultant.Builder |
Consultant.Builder.startWith(Properties properties) |
Ensures that Consultant starts out with a default Properties object.
|
Consultant.Builder |
Consultant.Builder.usingExecutor(ScheduledExecutorService executor) |
States that Consultant should use a specific executor service for listening to configuration updates.
|
Consultant.Builder |
Consultant.Builder.usingObjectMapper(com.fasterxml.jackson.databind.ObjectMapper mapper) |
States that Consultant should use a specific ObjectMapper for serialization and deserialization of JSON.
|
Consultant.Builder |
Consultant.Builder.validateConfigWith(ConfigValidator validator) |
Specifies the validator which is used to determine if a new configuration detected in Consul is valid,
and may be published through the ConfigListener callback.
|
Consultant.Builder |
Consultant.Builder.whenLocatingServicesCacheResultsFor(long duration,
TimeUnit unit) |
Specifies that the results from calls being made to Consul to locate services are being cached for at
most the specified duration.
|
Consultant.Builder |
Consultant.Builder.withConsulHost(String host) |
Specifies where the Consul REST API can be reached on.
|
Consultant.Builder |
Consultant.Builder.withConsulToken(String token) |
Specifies that a token must be set using the
X-Consul-Token header to authenticate requests
directed at Consul with. |
Consultant.Builder |
Consultant.Builder.withKvPrefix(String kvPrefix) |
Allows the caller to specify the prefix when looking up the key value properties.
|
Copyright © 2022. All rights reserved.