public class DefaultRequestManager extends Object implements RequestManager
RequestManager.Callback<Result>| Modifier and Type | Field and Description |
|---|---|
private JwtManager |
jwtManager
|
private com.fasterxml.jackson.databind.ObjectMapper |
objectMapper
ObjectMapper. |
private SettingsManager |
settingsManager
|
private UrlManager |
urlManager
|
| Constructor and Description |
|---|
DefaultRequestManager() |
| Modifier and Type | Method and Description |
|---|---|
private org.apache.hc.client5.http.classic.methods.HttpPost |
createPostRequest(String url,
RequestEntity requestEntity,
Security security) |
<R> R |
executeGetRequest(String url,
HttpClientSettings httpClientSettings,
RequestManager.Callback<R> callback)
Executes a GET request to the url.
|
<R> R |
executeGetRequest(String url,
RequestManager.Callback<R> callback)
Executes a GET request to the url.
|
<R> R |
executePostRequest(RequestedService requestedService,
RequestEntity requestEntity,
HttpClientSettings httpClientSettings,
RequestManager.Callback<R> callback)
Executes a POST request to the url.
|
<R> R |
executePostRequest(RequestedService requestedService,
RequestEntity requestEntity,
RequestManager.Callback<R> callback)
Executes a POST request to the specified service.
|
<R> R |
executePostRequest(String url,
RequestEntity requestEntity,
Security security,
HttpClientSettings httpClientSettings,
RequestManager.Callback<R> callback)
Executes a POST request to the url.
|
private <R> R |
executeRequest(org.apache.hc.client5.http.classic.methods.HttpUriRequest request,
HttpClientSettings httpClientSettings,
RequestManager.Callback<R> callback) |
private org.apache.hc.client5.http.impl.classic.CloseableHttpClient |
getHttpClient(HttpClientSettings httpClientSettings) |
private UrlManager urlManager
private JwtManager jwtManager
private SettingsManager settingsManager
private final com.fasterxml.jackson.databind.ObjectMapper objectMapper
ObjectMapper.public <R> R executeGetRequest(String url, RequestManager.Callback<R> callback) throws Exception
RequestManagerSettingsManager.executeGetRequest in interface RequestManagerR - The result type.url - The URL address to the document server.callback - The callback method.Exception - If the processing fails unexpectedly.public <R> R executeGetRequest(String url, HttpClientSettings httpClientSettings, RequestManager.Callback<R> callback) throws Exception
RequestManagerexecuteGetRequest in interface RequestManagerR - The result type.url - The URL address to the document server.httpClientSettings - The settings for http client.callback - The callback method.Exception - If the processing fails unexpectedly.public <R> R executePostRequest(RequestedService requestedService, RequestEntity requestEntity, RequestManager.Callback<R> callback) throws Exception
RequestManagerSettingsManager.executePostRequest in interface RequestManagerR - The result type.requestedService - The requested service.requestEntity - The requested entity.callback - The callback method.Exception - If the processing fails unexpectedly.SettingsManager,
RequestedService,
RequestEntitypublic <R> R executePostRequest(RequestedService requestedService, RequestEntity requestEntity, HttpClientSettings httpClientSettings, RequestManager.Callback<R> callback) throws Exception
RequestManagerexecutePostRequest in interface RequestManagerR - The result type.requestedService - The requested service.requestEntity - The requested entity.httpClientSettings - The settings for http client.callback - The callback method.Exception - If the processing fails unexpectedly.RequestEntity,
Securitypublic <R> R executePostRequest(String url, RequestEntity requestEntity, Security security, HttpClientSettings httpClientSettings, RequestManager.Callback<R> callback) throws Exception
RequestManagerexecutePostRequest in interface RequestManagerR - The result type.url - The URL address to the document server.requestEntity - The requested entity.security - The security parameters.httpClientSettings - The settings for http client.callback - The callback method.Exception - If the processing fails unexpectedly.RequestEntity,
Securityprivate <R> R executeRequest(org.apache.hc.client5.http.classic.methods.HttpUriRequest request,
HttpClientSettings httpClientSettings,
RequestManager.Callback<R> callback)
throws Exception
Exceptionprivate org.apache.hc.client5.http.classic.methods.HttpPost createPostRequest(String url, RequestEntity requestEntity, Security security) throws com.fasterxml.jackson.core.JsonProcessingException, URISyntaxException
com.fasterxml.jackson.core.JsonProcessingExceptionURISyntaxExceptionprivate org.apache.hc.client5.http.impl.classic.CloseableHttpClient getHttpClient(HttpClientSettings httpClientSettings) throws NoSuchAlgorithmException, KeyStoreException, KeyManagementException
Copyright © 2023–2024. All rights reserved.