T - The type of an encoded response.public interface ResponseCodec<T>
Response objects to and from another representation.| Modifier and Type | Method and Description |
|---|---|
Response |
decode(T encodedResponse)
Decodes a response.
|
T |
encode(java.util.function.Supplier<T> factory,
Response response)
Encodes a response.
|
T encode(java.util.function.Supplier<T> factory, Response response)
factory - creates a new instance of T.response - the response to encode.java.lang.IllegalArgumentException - If the object cannot be encoded.