Package com.github.tadukoo.web.rest.json
Class JSONClassBodyHandler<J extends com.github.tadukoo.parsing.json.JSONClass>
java.lang.Object
com.github.tadukoo.web.rest.json.JSONClassBodyHandler<J>
- Type Parameters:
J
- TheJSONClass
to convert the response into
- All Implemented Interfaces:
HttpResponse.BodyHandler<J>
public class JSONClassBodyHandler<J extends com.github.tadukoo.parsing.json.JSONClass>
extends Object
implements HttpResponse.BodyHandler<J>
A Response Body Handler used for grabbing the response as a specific
JSONClass
.- Version:
- Alpha v.0.1
- Author:
- Logan Ferree (Tadukoo)
-
Field Summary
-
Constructor Summary
ConstructorDescriptionJSONClassBodyHandler
(Class<J> clazz) Constructs a JSON Class Body Handler for the givenJSONClass
-
Method Summary
Modifier and TypeMethodDescriptionapply
(HttpResponse.ResponseInfo responseInfo) static <J> HttpResponse.BodySubscriber<J>
-
Field Details
-
clazz
TheJSONClass
class to convert the response into
-
-
Constructor Details
-
JSONClassBodyHandler
Constructs a JSON Class Body Handler for the givenJSONClass
- Parameters:
clazz
- TheJSONClass
class to convert the response into
-
-
Method Details
-
apply
- Specified by:
apply
in interfaceHttpResponse.BodyHandler<J extends com.github.tadukoo.parsing.json.JSONClass>
-
asJSON
- Type Parameters:
J
- The specificJSONClass
to convert the response into- Parameters:
clazz
- TheJSONClass
to convert the response into- Returns:
- A Response Body Subscriber that will convert a response into a specific
JSONClass
-