- java.lang.Object
-
- com.rabbitmq.http.client.JdkHttpClientHttpLayer
-
- All Implemented Interfaces:
HttpLayer
public final class JdkHttpClientHttpLayer extends Object implements HttpLayer
HttpLayerusing JDK 11'sHttpClient.- Since:
- 4.0.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classJdkHttpClientHttpLayer.ConfigurationClass to configure the defaultHttpLayerimplementation.-
Nested classes/interfaces inherited from interface com.rabbitmq.http.client.HttpLayer
HttpLayer.HttpLayerFactory
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Stringauthorization(String username, String password)static JdkHttpClientHttpLayer.Configurationconfigure()Configure the defaultHttpLayerimplementation.voiddelete(URI uri, Map<String,String> headers)DELETE operation.<T> Tget(URI uri, com.rabbitmq.http.client.ParameterizedTypeReference<T> typeReference)Get operation when the expected class uses generics, likeList<T>orPage<T>.<T> Tget(URI uri, Class<T> responseClass)GET operation when the expected class does not use generics.<T> Tpost(URI uri, Object requestBody, Class<T> responseClass)POST operation.voidput(URI uri, Object requestBody)PUT operation.
-
-
-
Method Detail
-
configure
public static JdkHttpClientHttpLayer.Configuration configure()
Configure the defaultHttpLayerimplementation.- Returns:
- a configuration instance
-
get
public <T> T get(URI uri, Class<T> responseClass)
Description copied from interface:HttpLayerGET operation when the expected class does not use generics.
-
get
public <T> T get(URI uri, com.rabbitmq.http.client.ParameterizedTypeReference<T> typeReference)
Description copied from interface:HttpLayerGet operation when the expected class uses generics, likeList<T>orPage<T>.
-
post
public <T> T post(URI uri, Object requestBody, Class<T> responseClass)
Description copied from interface:HttpLayerPOST operation.Response class is optional.
-
put
public void put(URI uri, Object requestBody)
Description copied from interface:HttpLayerPUT operation.
-
-