Tabnine Logo
InstanceInfo$Builder.withHealthCheckUrls
Code IndexAdd Tabnine to your IDE (free)

How to use
withHealthCheckUrls
method
in
com.netflix.eureka2.registry.InstanceInfo$Builder

Best Java code snippets using com.netflix.eureka2.registry.InstanceInfo$Builder.withHealthCheckUrls (Showing top 4 results out of 315)

origin: com.netflix.eureka2/eureka-testkit

protected Builder templateFor(String name) {
  HashSet<String> healthCheckUrls = new HashSet<>();
  healthCheckUrls.add("http://eureka/healthCheck/" + name + "1");
  healthCheckUrls.add("http://eureka/healthCheck/" + name + "2");
  HashSet<Integer> ports = new HashSet<>();
  ports.add(80);
  ports.add(8080);
  HashSet<Integer> securePorts = new HashSet<>();
  securePorts.add(443);
  securePorts.add(8443);
  return new Builder()
      .withId("id#" + name + "_" + UUID.randomUUID().toString())
      .withApp("app#" + name)
      .withAppGroup("group#" + name)
      .withAsg("asg#" + name)
      .withHealthCheckUrls(healthCheckUrls)
      .withHomePageUrl("http://eureka/home/" + name)
      .withPorts(Sets.asSet(new ServicePort(7200, false), new ServicePort(7210, true)))
      .withSecureVipAddress("vipSecure#" + name)
      .withStatus(Status.UP)
      .withStatusPageUrl("http://eureka/status/" + name)
      .withVipAddress("vip#" + name)
      .withMetaData("optionA", "valueA")
      .withMetaData("optionB", "valueB")
      .withDataCenterInfo(SampleAwsDataCenterInfo.UsEast1a.build());
}
origin: com.netflix.eureka2/eureka-server

  @Override
  public InstanceInfo.Builder call(DataCenterInfo dataCenterInfo) {
    final String instanceId = config.getAppName() + '#' + UUID.randomUUID().toString();
    String address = AddressSelector.selectBy().publicIp(true).or().any().returnNameOrIp(dataCenterInfo.getAddresses());
    HashSet<String> healthCheckUrls = new HashSet<String>();
    healthCheckUrls.add("http://" + address + ':' + config.getWebAdminPort() + "/healthcheck");
    return new InstanceInfo.Builder()
        .withId(instanceId)
        .withApp(config.getAppName())
        .withVipAddress(config.getVipAddress())
        .withHealthCheckUrls(healthCheckUrls)
        .withDataCenterInfo(dataCenterInfo)
        .withStatus(InstanceInfo.Status.UP);  // for now just register with UP
  }
});
origin: com.netflix.eureka2/eureka-testkit

@Override
public InstanceInfo next() {
  int cidx = idx.incrementAndGet();
  String name = baseName + '_' + cidx;
  NetworkAddress publicAddress = publicAddresses.next();
  NetworkAddress privateAddress = privateAddresses.next();
  DataCenterInfo dataCenter = new AwsDataCenterInfo.Builder()
      .withAwsDataCenter(templateDataCenter)
      .withPublicHostName(publicAddress.getHostName())
      .withPublicIPv4(publicAddress.getIpAddress())
      .withPrivateHostName(privateAddress.getHostName())
      .withPrivateIPv4(privateAddress.getIpAddress())
      .build();
  return new InstanceInfo.Builder()
      .withId("id#" + name)
      .withApp("app#" + baseName)
      .withAppGroup("group#" + baseName)
      .withAsg("asg#" + baseName)
      .withHealthCheckUrls(template.getHealthCheckUrls())
      .withHomePageUrl(template.getHomePageUrl())
      .withPorts(template.getPorts())
      .withSecureVipAddress("vipSecure#" + name)
      .withStatus(template.getStatus())
      .withStatusPageUrl(template.getStatusPageUrl())
      .withVipAddress("vip#" + baseName)
      .withMetaData(template.getMetaData())
      .withDataCenterInfo(dataCenter)
      .build();
}
origin: com.netflix.eureka2/eureka-bridge

@Override
public InstanceInfo fromV1(com.netflix.appinfo.InstanceInfo v1Info) {
  InstanceInfo.Builder builder = new InstanceInfo.Builder()
      .withId(v1Info.getAppName() + "_" + v1Info.getId())  // instanceId is not unique for v1Data
      .withAppGroup(v1Info.getAppGroupName())
      .withApp(v1Info.getAppName())
      .withAsg(v1Info.getASGName())
      .withVipAddress(v1Info.getVIPAddress())
      .withSecureVipAddress(v1Info.getSecureVipAddress())
      .withPorts(toSet(new ServicePort(v1Info.getPort(), false), new ServicePort(v1Info.getSecurePort(), true)))
      .withStatus(fromV1(v1Info.getStatus()))
      .withHomePageUrl(v1Info.getHomePageUrl())
      .withStatusPageUrl(v1Info.getStatusPageUrl())
      .withHealthCheckUrls(new HashSet<>(v1Info.getHealthCheckUrls()))
      .withMetaData(v1Info.getMetadata())
      .withDataCenterInfo(fromV1(v1Info.getDataCenterInfo()));
  return builder.build();
}
com.netflix.eureka2.registryInstanceInfo$BuilderwithHealthCheckUrls

Popular methods of InstanceInfo$Builder

  • <init>
  • build
  • withApp
  • withDataCenterInfo
  • withId
  • withStatus
  • withVipAddress
  • withAppGroup
  • withAsg
  • withHomePageUrl
  • withInstanceInfo
  • withMetaData
  • withInstanceInfo,
  • withMetaData,
  • withPorts,
  • withSecureVipAddress,
  • withStatusPageUrl,
  • withVersion

Popular in Java

  • Updating database using SQL prepared statement
  • findViewById (Activity)
  • runOnUiThread (Activity)
  • startActivity (Activity)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • JLabel (javax.swing)
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now