public class UriBuilder extends Object
| Modifier and Type | Method and Description |
|---|---|
URI |
build()
Build the final URI.
|
static UriBuilder |
fromEndpoint(String endpoint)
Create
UriBuilder starting from a given string. |
static UriBuilder |
fromEndpoint(URI endpoint)
Create
UriBuilder starting from a given URI. |
UriBuilder |
path(String path)
Add a path component to the URI.
|
UriBuilder |
queryParam(String name,
Integer value)
Add a query param (e.g: ?param=key)
|
UriBuilder |
queryParam(String name,
Long value)
Add a query param (e.g: ?param=key)
|
UriBuilder |
queryParam(String name,
String value)
Add a query param (e.g: ?param=key)
|
public static UriBuilder fromEndpoint(String endpoint)
UriBuilder starting from a given string.endpoint - Endpoint in string format.public static UriBuilder fromEndpoint(URI endpoint)
UriBuilder starting from a given URI.endpoint - Endpoint in URI format.public UriBuilder path(String path)
path - Path component(s) as String.public UriBuilder queryParam(String name, String value)
name - Name of the param.value - Value of the param.public UriBuilder queryParam(String name, Integer value)
name - Name of the param.value - Value of the numeric param (must be a Integer.public UriBuilder queryParam(String name, Long value)
name - Name of the param.value - Value of the numeric param (must be a Long.public URI build() throws UriBuilderException
UriBuilderExceptionCopyright © 2015. All rights reserved.