Package org.apache.pulsar.client.impl
Class PulsarServiceNameResolver
- java.lang.Object
-
- org.apache.pulsar.client.impl.PulsarServiceNameResolver
-
- All Implemented Interfaces:
ServiceNameResolver
public class PulsarServiceNameResolver extends java.lang.Object implements ServiceNameResolver
The default implementation ofServiceNameResolver.
-
-
Constructor Summary
Constructors Constructor Description PulsarServiceNameResolver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.pulsar.common.net.ServiceURIgetServiceUri()Get service uri.java.lang.StringgetServiceUrl()Get service url.java.net.InetSocketAddressresolveHost()Resolve pulsar service url.java.net.URIresolveHostUri()Resolve pulsar service url.voidupdateServiceUrl(java.lang.String serviceUrl)Update service url.
-
-
-
Method Detail
-
resolveHost
public java.net.InetSocketAddress resolveHost()
Description copied from interface:ServiceNameResolverResolve pulsar service url.- Specified by:
resolveHostin interfaceServiceNameResolver- Returns:
- resolve the service url to return a socket address
-
resolveHostUri
public java.net.URI resolveHostUri()
Description copied from interface:ServiceNameResolverResolve pulsar service url.- Specified by:
resolveHostUriin interfaceServiceNameResolver- Returns:
-
getServiceUrl
public java.lang.String getServiceUrl()
Description copied from interface:ServiceNameResolverGet service url.- Specified by:
getServiceUrlin interfaceServiceNameResolver- Returns:
- service url
-
getServiceUri
public org.apache.pulsar.common.net.ServiceURI getServiceUri()
Description copied from interface:ServiceNameResolverGet service uri.- Specified by:
getServiceUriin interfaceServiceNameResolver- Returns:
- service uri
-
updateServiceUrl
public void updateServiceUrl(java.lang.String serviceUrl) throws org.apache.pulsar.client.api.PulsarClientException.InvalidServiceURLDescription copied from interface:ServiceNameResolverUpdate service url.- Specified by:
updateServiceUrlin interfaceServiceNameResolver- Parameters:
serviceUrl- service url- Throws:
org.apache.pulsar.client.api.PulsarClientException.InvalidServiceURL
-
-