Class AbstractClient
java.lang.Object
net.avcompris.commons3.client.impl.AbstractClient
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static interface
protected static interface
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractClient
(String baseURL, SessionPropagator sessionPropagator) -
Method Summary
Modifier and TypeMethodDescriptionprotected static <U extends V,
V>
org.springframework.web.client.RestTemplateprotected static <U extends V,
V>
org.springframework.web.client.RestTemplatecreateRestTemplate
(Class<?> responseClass) protected static <U,
V extends U>
org.springframework.web.client.RestTemplatecreateRestTemplate
(Class<?> responseClass, Class<U> subClass1, Class<V> subImplClass1) protected final <T,
U> org.springframework.http.ResponseEntity<T> exchange
(org.springframework.web.client.RestTemplate restTemplate, String uri, org.springframework.http.HttpMethod method, org.springframework.http.HttpEntity<U> request, Class<T> clazz) protected static org.springframework.http.HttpHeaders
protected static org.springframework.http.HttpHeaders
headers
(String correlationId, SessionPropagator sessionPropagator) protected final <U> void
postForLocation
(org.springframework.web.client.RestTemplate restTemplate, String uri, org.springframework.http.HttpEntity<U> request) protected static <T> T
wrap
(AbstractClient.Action<T> action) protected static void
wrap
(AbstractClient.ActionVoid action)
-
Field Details
-
baseURL
-
sessionPropagator
-
-
Constructor Details
-
AbstractClient
-
-
Method Details
-
createRestTemplate
protected static <U extends V,V> org.springframework.web.client.RestTemplate createRestTemplate() -
createRestTemplate
protected static <U extends V,V> org.springframework.web.client.RestTemplate createRestTemplate(Class<?> responseClass) -
createRestTemplate
-
headers
protected static org.springframework.http.HttpHeaders headers(String correlationId, SessionPropagator sessionPropagator) -
headers
-
wrap
- Throws:
ServiceException
-
wrap
- Throws:
ServiceException
-
exchange
-
postForLocation
protected final <U> void postForLocation(org.springframework.web.client.RestTemplate restTemplate, String uri, org.springframework.http.HttpEntity<U> request)
-