@FunctionalInterface public interface ServiceClientCallable<T>
Modifier and Type | Method and Description |
---|---|
T |
call(org.apache.http.client.HttpClient client)
Overridden by implementors, actually starts the service call
|
static <R> ServiceClientCallable<R> |
delete(IDeserializationFormat<R> deserializationFormat,
java.lang.String uri) |
static <R> ServiceClientCallable<R> |
get(IDeserializationFormat<R> deserializationFormat,
java.lang.String uri) |
static <R> ServiceClientCallable<R> |
post(IDeserializationFormat<R> deserializationFormat,
java.lang.String uri) |
static <S,T extends S,R> |
post(ISerializationFormat<S> serializationFormat,
T data,
IDeserializationFormat<R> deserializationFormat,
java.lang.String uri) |
static <R> ServiceClientCallable<R> |
put(IDeserializationFormat<R> deserializationFormat,
java.lang.String uri)
Deprecated.
PUT requests should always have a body
|
static <S,T extends S,R> |
put(ISerializationFormat<S> serializationFormat,
T data,
IDeserializationFormat<R> deserializationFormat,
java.lang.String uri) |
static <T> T |
with(ServerDetails serverDetails,
ServiceClientCallable<T> callable)
Helper method for starting a service call with the given
ServerDetails . |
static <T> T |
withHttpClient(org.apache.http.impl.client.CloseableHttpClient client,
ServiceClientCallable<T> callable)
Helper method for starting a service call using a given
CloseableHttpClient . |
T call(org.apache.http.client.HttpClient client) throws ServiceCallException
ServiceCallException
static <T> T withHttpClient(org.apache.http.impl.client.CloseableHttpClient client, ServiceClientCallable<T> callable) throws ServiceCallException
CloseableHttpClient
.ServiceCallException
static <T> T with(ServerDetails serverDetails, ServiceClientCallable<T> callable) throws ServiceCallException
ServerDetails
.ServiceCallException
static <R> ServiceClientCallable<R> get(IDeserializationFormat<R> deserializationFormat, java.lang.String uri)
ServiceClientCallable
for a HTTP GET on the given URI.static <S,T extends S,R> ServiceClientCallable<R> post(ISerializationFormat<S> serializationFormat, T data, IDeserializationFormat<R> deserializationFormat, java.lang.String uri)
ServiceClientCallable
for a HTTP POST on the given URI.static <R> ServiceClientCallable<R> post(IDeserializationFormat<R> deserializationFormat, java.lang.String uri)
ServiceClientCallable
for a HTTP POST on the given URI.static <S,T extends S,R> ServiceClientCallable<R> put(ISerializationFormat<S> serializationFormat, T data, IDeserializationFormat<R> deserializationFormat, java.lang.String uri)
ServiceClientCallable
for a HTTP PUT on the given URI.@Deprecated static <R> ServiceClientCallable<R> put(IDeserializationFormat<R> deserializationFormat, java.lang.String uri)
ServiceClientCallable
for a HTTP PUT on the given URI
without any payload.static <R> ServiceClientCallable<R> delete(IDeserializationFormat<R> deserializationFormat, java.lang.String uri)
ServiceClientCallable
for a HTTP DELETE on the given URI.