Package de.chojo.nexus
Class NexusRestBuilder
java.lang.Object
de.chojo.nexus.NexusRestBuilder
Class to build a nexus rest client
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build the api.setAuth
(Authenticator authenticator) Set the authenticator for the underlyingHttpClient
builder.setExecutorService
(ScheduledExecutorService executorService) Set the executor service used for asynchronous requests.setHttp
(HttpClient http) Set the http client used to send requestssetPasswordAuth
(String username, String password) Set the authenticator for the underlyingHttpClient
builder.
-
Constructor Details
-
NexusRestBuilder
-
-
Method Details
-
setHttp
Set the http client used to send requests- Parameters:
http
- client- Returns:
- builder
-
setAuth
Set the authenticator for the underlyingHttpClient
builder.- Parameters:
authenticator
- authenticator- Returns:
- builder
-
setPasswordAuth
Set the authenticator for the underlyingHttpClient
builder.- Parameters:
username
- usernamepassword
- password- Returns:
- builder
-
header
-
setExecutorService
@CheckReturnValue public NexusRestBuilder setExecutorService(ScheduledExecutorService executorService) Set the executor service used for asynchronous requests.- Parameters:
executorService
- executor service- Returns:
- builder
-
build
Build the api. The instance is ready to use.- Returns:
- api instance
-