Class ServiceDiscoveryBundle<T extends io.dropwizard.Configuration>
java.lang.Object
io.appform.ranger.discovery.bundle.ServiceDiscoveryBundle<T>
- All Implemented Interfaces:
io.dropwizard.ConfiguredBundle<T>
public abstract class ServiceDiscoveryBundle<T extends io.dropwizard.Configuration>
extends Object
implements io.dropwizard.ConfiguredBundle<T>
A dropwizard bundle for service discovery.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotectedServiceDiscoveryBundle(List<IdValidationConstraint> globalIdConstraints) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanalwaysMergeWithInitialCriteria(T configuration) protected NodeInfoResolverprotected PortSchemeResolver<T>protected List<io.appform.ranger.core.healthservice.monitor.IsolatedHealthMonitor<io.appform.ranger.core.healthcheck.HealthcheckStatus>>protected StringgetHost()getInitialCriteria(T configuration) Override the following if you require.protected intprotected abstract ServiceDiscoveryConfigurationgetRangerConfiguration(T configuration) protected abstract StringgetServiceName(T configuration) protected io.appform.ranger.core.model.ShardSelector<ShardInfo,io.appform.ranger.core.finder.serviceregistry.MapBasedServiceRegistry<ShardInfo>> getShardSelector(T configuration) voidinitialize(io.dropwizard.setup.Bootstrap<?> bootstrap) voidregisterHealthcheck(io.appform.ranger.core.healthcheck.Healthcheck healthcheck) voidregisterHealthchecks(List<io.appform.ranger.core.healthcheck.Healthcheck> healthchecks) void
-
Constructor Details
-
ServiceDiscoveryBundle
protected ServiceDiscoveryBundle() -
ServiceDiscoveryBundle
-
-
Method Details
-
initialize
public void initialize(io.dropwizard.setup.Bootstrap<?> bootstrap) - Specified by:
initializein interfaceio.dropwizard.ConfiguredBundle<T extends io.dropwizard.Configuration>
-
run
-
getShardSelector
-
getRangerConfiguration
-
getServiceName
-
createNodeInfoResolver
-
createPortSchemeResolver
-
getInitialCriteria
Override the following if you require. -
alwaysMergeWithInitialCriteria
-
getHealthMonitors
protected List<io.appform.ranger.core.healthservice.monitor.IsolatedHealthMonitor<io.appform.ranger.core.healthcheck.HealthcheckStatus>> getHealthMonitors() -
getPort
-
getHost
- Throws:
UnknownHostException
-
registerHealthcheck
public void registerHealthcheck(io.appform.ranger.core.healthcheck.Healthcheck healthcheck) -
registerHealthchecks
-