@Test public void testCreateZeebeClientShouldConfigureContactPoint() { final ZeebeClient actual = ResponsiveHealthIndicator.createZeebeClient(TEST_CFG, TEST_DURATION); assertThat(actual.getConfiguration().getGatewayAddress()).isEqualTo("testhost:1234"); }
static ZeebeClient createZeebeClient(final GatewayCfg gatewayCfg, final Duration defaultTimeout) { final String gatewayAddress = getContactPoint(gatewayCfg); ZeebeClientBuilder clientBuilder = ZeebeClient.newClientBuilder() .gatewayAddress(gatewayAddress) .defaultRequestTimeout(defaultTimeout); if (gatewayCfg.getSecurity().isEnabled()) { clientBuilder = clientBuilder.caCertificatePath(gatewayCfg.getSecurity().getCertificateChainPath()); } else { clientBuilder = clientBuilder.usePlaintext(); } return clientBuilder.build(); }
ResponsiveHealthIndicator implements HealthIndicator { static ZeebeClient createZeebeClient(final GatewayCfg gatewayCfg, final Duration defaultTimeout) { final String gatewayAddress = getContactPoint(gatewayCfg); ZeebeClientBuilder clientBuilder = ZeebeClient.newClientBuilder() .gatewayAddress(gatewayAddress) .defaultRequestTimeout(defaultTimeout); if (gatewayCfg.getSecurity().isEnabled()) { clientBuilder = clientBuilder.caCertificatePath(gatewayCfg.getSecurity().getCertificateChainPath()); } else { clientBuilder = clientBuilder.usePlaintext(); } return clientBuilder.build(); } }
ResponsiveHealthIndicator implements HealthIndicator { static ZeebeClient createZeebeClient(final GatewayCfg gatewayCfg, final Duration defaultTimeout) { final String gatewayAddress = getContactPoint(gatewayCfg); ZeebeClientBuilder clientBuilder = ZeebeClient.newClientBuilder() .gatewayAddress(gatewayAddress) .defaultRequestTimeout(defaultTimeout); if (gatewayCfg.getSecurity().isEnabled()) { clientBuilder = clientBuilder.caCertificatePath(gatewayCfg.getSecurity().getCertificateChainPath()); } else { clientBuilder = clientBuilder.usePlaintext(); } return clientBuilder.build(); } ResponsiveHealthIndicator(final GatewayCfg gatewayCfg, final Duration defaultTimeout); }
ResponsiveHealthIndicator implements HealthIndicator { static ZeebeClient createZeebeClient(final GatewayCfg gatewayCfg, final Duration defaultTimeout) { final String gatewayAddress = getContactPoint(gatewayCfg); ZeebeClientBuilder clientBuilder = ZeebeClient.newClientBuilder() .gatewayAddress(gatewayAddress) .defaultRequestTimeout(defaultTimeout); if (gatewayCfg.getSecurity().isEnabled()) { clientBuilder = clientBuilder.caCertificatePath(gatewayCfg.getSecurity().getCertificateChainPath()); } else { clientBuilder = clientBuilder.usePlaintext(); } return clientBuilder.build(); } ResponsiveHealthIndicator(final GatewayCfg gatewayCfg, final Duration defaultTimeout); @Override Health health(); }
ResponsiveHealthIndicator implements HealthIndicator { static ZeebeClient createZeebeClient(final GatewayCfg gatewayCfg, final Duration defaultTimeout) { final String gatewayAddress = getContactPoint(gatewayCfg); ZeebeClientBuilder clientBuilder = ZeebeClient.newClientBuilder() .gatewayAddress(gatewayAddress) .defaultRequestTimeout(defaultTimeout); if (gatewayCfg.getSecurity().isEnabled()) { clientBuilder = clientBuilder.caCertificatePath(gatewayCfg.getSecurity().getCertificateChainPath()); } else { clientBuilder = clientBuilder.usePlaintext(); } return clientBuilder.build(); } ResponsiveHealthIndicator(final GatewayCfg gatewayCfg, final Duration defaultTimeout); @Override Health health();  }