public class MicroserviceRestTemplate
extends org.springframework.web.client.RestTemplate
| Constructor and Description |
|---|
MicroserviceRestTemplate(Boolean tryToReconnect,
int tryToReconnectTimes,
int sleepTimeBetweenTrying,
String microserviceName,
String pathToApiResource,
org.springframework.http.HttpMethod httpMethod)
RestTemplate that tried to reconnect or error |
MicroserviceRestTemplate(String microserviceName,
String pathToApiResource,
org.springframework.http.HttpMethod httpMethod) |
| Modifier and Type | Method and Description |
|---|---|
protected <T> T |
doExecute(URI urlFake,
org.springframework.http.HttpMethod method,
org.springframework.web.client.RequestCallback requestCallback,
org.springframework.web.client.ResponseExtractor<T> responseExtractor) |
org.springframework.http.client.ClientHttpRequest |
getClientHttpRequest() |
URI |
getLastURI() |
org.springframework.http.HttpMethod |
getMethod() |
String |
getMicroserviceName() |
String |
getPathToApiResource() |
org.springframework.web.client.RequestCallback |
getRequestCallback() |
org.springframework.web.client.ResponseExtractor |
getResponseExtractor() |
void |
setClientHttpRequest(org.springframework.http.client.ClientHttpRequest clientHttpRequest) |
void |
setRequestCallback(org.springframework.web.client.RequestCallback requestCallback) |
void |
setResponseExtractor(org.springframework.web.client.ResponseExtractor responseExtractor) |
acceptHeaderRequestCallback, delete, delete, delete, exchange, exchange, exchange, exchange, exchange, exchange, exchange, exchange, execute, execute, execute, getErrorHandler, getForEntity, getForEntity, getForEntity, getForObject, getForObject, getForObject, getMessageConverters, getUriTemplateHandler, handleResponse, headersExtractor, headForHeaders, headForHeaders, headForHeaders, httpEntityCallback, httpEntityCallback, optionsForAllow, optionsForAllow, optionsForAllow, postForEntity, postForEntity, postForEntity, postForLocation, postForLocation, postForLocation, postForObject, postForObject, postForObject, put, put, put, responseEntityExtractor, setDefaultUriVariables, setErrorHandler, setMessageConverters, setUriTemplateHandlergetInterceptors, getRequestFactory, setInterceptorspublic MicroserviceRestTemplate(String microserviceName, String pathToApiResource, org.springframework.http.HttpMethod httpMethod) throws URISyntaxException
URISyntaxExceptionpublic MicroserviceRestTemplate(Boolean tryToReconnect, int tryToReconnectTimes, int sleepTimeBetweenTrying, String microserviceName, String pathToApiResource, org.springframework.http.HttpMethod httpMethod) throws URISyntaxException
RestTemplate that tried to reconnect or errortryToReconnect - true if try to retry failed request to microsrevicetryToReconnectTimes - number of times to try to reconnectmicroserviceName - microservice namepathToApiResource - pathToApiResourcehttpMethod - http methodsleepTimeBetweenTrying - sleep in millias to try to reconnect between failed requestsURISyntaxException - exceptionprotected <T> T doExecute(URI urlFake, org.springframework.http.HttpMethod method, org.springframework.web.client.RequestCallback requestCallback, org.springframework.web.client.ResponseExtractor<T> responseExtractor) throws org.springframework.web.client.RestClientException
doExecute in class org.springframework.web.client.RestTemplateorg.springframework.web.client.RestClientExceptionpublic org.springframework.http.HttpMethod getMethod()
public org.springframework.web.client.RequestCallback getRequestCallback()
public void setRequestCallback(org.springframework.web.client.RequestCallback requestCallback)
public org.springframework.http.client.ClientHttpRequest getClientHttpRequest()
public void setClientHttpRequest(org.springframework.http.client.ClientHttpRequest clientHttpRequest)
public org.springframework.web.client.ResponseExtractor getResponseExtractor()
public void setResponseExtractor(org.springframework.web.client.ResponseExtractor responseExtractor)
public String getMicroserviceName()
public String getPathToApiResource()
public URI getLastURI()
Copyright © 2016. All rights reserved.