public interface ServiceDiscoverer
Modifier and Type | Method and Description |
---|---|
URL |
getServiceURL(String serviceId)
Discover the base URL for a Service in the same application, relative to which Service
endpoints can be accessed
|
URL |
getServiceURL(String applicationId,
String serviceId)
Discover the base URL for a Service, relative to which Service endpoints can be accessed
|
default URL |
getServiceURL(String namespaceId,
String applicationId,
String serviceId)
Discover the base URL for a Service of an Application running in a Namespace, relative to which
Service endpoints can be accessed
|
default HttpURLConnection |
openConnection(String namespaceId,
String applicationId,
String serviceId,
String methodPath)
Opens a
HttpURLConnection for connecting to the given Service endpoint. |
@Nullable default URL getServiceURL(String namespaceId, String applicationId, String serviceId)
namespaceId
- Namespace of the applicationapplicationId
- Application nameserviceId
- Service name@Nullable URL getServiceURL(String applicationId, String serviceId)
applicationId
- Application nameserviceId
- Service name@Nullable URL getServiceURL(String serviceId)
serviceId
- Service Name@Nullable default HttpURLConnection openConnection(String namespaceId, String applicationId, String serviceId, String methodPath) throws IOException
HttpURLConnection
for connecting to the given Service endpoint.namespaceId
- Namespace of the applicationapplicationId
- Application nameserviceId
- Service namemethodPath
- Service method path as declared by the service handlerHttpURLConnection
for communicating with the Service endpoint, or null
if the service is not foundIOException
- if Service is found but failed to open a connection to the given
Service endpointCopyright © 2024 Cask Data, Inc. Licensed under the Apache License, Version 2.0.