Class GesturesAPIRestClient
java.lang.Object
info.ejava.examples.svc.httpapi.gestures.client.GesturesAPIRestClient
- All Implemented Interfaces:
GesturesAPI
This class demonstrates an implementation of the Gestures client using
RestClient. The primary difference between this and the RestTemplate
version is the fluent API.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final URI
private final org.springframework.web.client.RestClient
Fields inherited from interface info.ejava.examples.svc.httpapi.gestures.api.GesturesAPI
GESTURE_PATH, GESTURES_PATH, target
-
Constructor Summary
ConstructorsConstructorDescriptionGesturesAPIRestClient
(org.springframework.web.client.RestClient restClient, ServerConfig serverConfig) -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity
<Void> org.springframework.http.ResponseEntity
<Void> deleteGesture
(String gestureType) org.springframework.http.ResponseEntity
<Void> org.springframework.http.ResponseEntity
<String> getGesture
(String gestureType, String target) org.springframework.http.ResponseEntity
<String> upsertGesture
(String gestureType, String gesture)
-
Field Details
-
baseUrl
-
restClient
private final org.springframework.web.client.RestClient restClient
-
-
Constructor Details
-
GesturesAPIRestClient
public GesturesAPIRestClient(org.springframework.web.client.RestClient restClient, ServerConfig serverConfig)
-
-
Method Details
-
upsertGesture
public org.springframework.http.ResponseEntity<String> upsertGesture(String gestureType, String gesture) - Specified by:
upsertGesture
in interfaceGesturesAPI
-
getGesture
public org.springframework.http.ResponseEntity<String> getGesture(String gestureType, String target) - Specified by:
getGesture
in interfaceGesturesAPI
-
deleteAllGestures
- Specified by:
deleteAllGestures
in interfaceGesturesAPI
-
deleteGesture
- Specified by:
deleteGesture
in interfaceGesturesAPI
-
doDelete
-