public class ServiceConfigurationUtils extends Object
| Constructor and Description |
|---|
ServiceConfigurationUtils() |
| Modifier and Type | Method and Description |
|---|---|
static String |
brokerUrl(String host,
int port) |
static String |
brokerUrlTls(String host,
int port) |
static String |
getAppliedAdvertisedAddress(ServiceConfiguration configuration,
boolean ignoreAdvertisedListener)
Deprecated.
|
static String |
getDefaultOrConfiguredAddress(String configuredAddress) |
static org.apache.pulsar.policies.data.loadbalancer.AdvertisedListener |
getInternalListener(ServiceConfiguration config)
Gets the internal advertised listener for broker-to-broker communication.
|
static String |
getWebServiceAddress(ServiceConfiguration config)
Gets the web service address (hostname).
|
static String |
unsafeLocalhostResolve() |
static String |
webServiceUrl(String host,
int port) |
static String |
webServiceUrlTls(String host,
int port) |
public static String getDefaultOrConfiguredAddress(String configuredAddress)
public static String unsafeLocalhostResolve()
@Deprecated public static String getAppliedAdvertisedAddress(ServiceConfiguration configuration, boolean ignoreAdvertisedListener)
configuration - ignoreAdvertisedListener - Sometimes we can’t use the default key of AdvertisedListener,
setting it to true can ignore AdvertisedListener.public static org.apache.pulsar.policies.data.loadbalancer.AdvertisedListener getInternalListener(ServiceConfiguration config)
public static String getWebServiceAddress(ServiceConfiguration config)
Copyright © 2017–2021 Apache Software Foundation. All rights reserved.