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 Details

    • ServiceDiscoveryBundle

      protected ServiceDiscoveryBundle()
    • ServiceDiscoveryBundle

      protected ServiceDiscoveryBundle(List<IdValidationConstraint> globalIdConstraints)
  • Method Details

    • initialize

      public void initialize(io.dropwizard.setup.Bootstrap<?> bootstrap)
      Specified by:
      initialize in interface io.dropwizard.ConfiguredBundle<T extends io.dropwizard.Configuration>
    • run

      public void run(T configuration, io.dropwizard.setup.Environment environment) throws Exception
      Specified by:
      run in interface io.dropwizard.ConfiguredBundle<T extends io.dropwizard.Configuration>
      Throws:
      Exception
    • getShardSelector

      protected io.appform.ranger.core.model.ShardSelector<ShardInfo,io.appform.ranger.core.finder.serviceregistry.MapBasedServiceRegistry<ShardInfo>> getShardSelector(T configuration)
    • getRangerConfiguration

      protected abstract ServiceDiscoveryConfiguration getRangerConfiguration(T configuration)
    • getServiceName

      protected abstract String getServiceName(T configuration)
    • createNodeInfoResolver

      protected NodeInfoResolver createNodeInfoResolver()
    • createPortSchemeResolver

      protected PortSchemeResolver<T> createPortSchemeResolver()
    • getInitialCriteria

      protected Predicate<ShardInfo> getInitialCriteria(T configuration)
      Override the following if you require.
    • alwaysMergeWithInitialCriteria

      protected boolean alwaysMergeWithInitialCriteria(T configuration)
    • getHealthMonitors

      protected List<io.appform.ranger.core.healthservice.monitor.IsolatedHealthMonitor<io.appform.ranger.core.healthcheck.HealthcheckStatus>> getHealthMonitors()
    • getPort

      protected int getPort(T configuration)
    • getHost

      protected String getHost() throws UnknownHostException
      Throws:
      UnknownHostException
    • registerHealthcheck

      public void registerHealthcheck(io.appform.ranger.core.healthcheck.Healthcheck healthcheck)
    • registerHealthchecks

      public void registerHealthchecks(List<io.appform.ranger.core.healthcheck.Healthcheck> healthchecks)