public abstract class Service extends Object
| Modifier and Type | Method and Description |
|---|---|
URI |
getBaseUri()
Gets the base URI of this service.
|
URI |
getEndpointUri(String endpoint)
Gets the URI of a specific endpoint of this service.
|
URI |
getEndpointUri(String endpoint,
Map<String,String> queryParams)
Gets the URI of a specific endpoint of this service.
|
Proxy |
getProxy()
Gets the proxy used by this service.
|
void |
setBaseUri(String baseUri)
Sets the base URI of this service.
|
void |
setBaseUri(URI baseUri)
Sets the base URI of this service.
|
void |
setProxy(Proxy proxy)
Sets the proxy used by this service.
|
public Service(URI initialBaseUri)
public URI getBaseUri()
public void setBaseUri(String baseUri)
baseUri - The base URI to use.IllegalArgumentException - If the provided base URI is null or malformed.public void setBaseUri(URI baseUri)
baseUri - The base URI to use.IllegalArgumentException - If the provided base URI is null.public URI getEndpointUri(String endpoint)
endpoint - Endpoint to get the URI of.public URI getEndpointUri(String endpoint, Map<String,String> queryParams)
endpoint - Endpoint to get the URI of.queryParams - Query parameters to append to the URI.public Proxy getProxy()
public void setProxy(Proxy proxy)
proxy - Proxy to use. Null will be converted to NO_PROXY.Copyright © 2023. All rights reserved.