Class AbstractClient

java.lang.Object
net.avcompris.commons3.client.impl.AbstractClient

public abstract class AbstractClient extends Object
  • Field Details

  • Constructor Details

  • 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

      protected static <U, V extends U> org.springframework.web.client.RestTemplate createRestTemplate(Class<?> responseClass, Class<U> subClass1, Class<V> subImplClass1)
    • headers

      protected static org.springframework.http.HttpHeaders headers(String correlationId, SessionPropagator sessionPropagator)
    • headers

      protected static org.springframework.http.HttpHeaders headers(@Nullable String correlationId, @Nullable String authorizationHeader, @Nullable String userSessionId)
    • wrap

      protected static <T> T wrap(AbstractClient.Action<T> action) throws ServiceException
      Throws:
      ServiceException
    • wrap

      protected static void wrap(AbstractClient.ActionVoid action) throws ServiceException
      Throws:
      ServiceException
    • exchange

      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)
    • postForLocation

      protected final <U> void postForLocation(org.springframework.web.client.RestTemplate restTemplate, String uri, org.springframework.http.HttpEntity<U> request)