Package org.openqa.selenium.remote
Interface ResponseCodec<T>
-
- Type Parameters:
T- The type of an encoded response.
- All Known Implementing Classes:
AbstractHttpResponseCodec,JsonHttpResponseCodec,W3CHttpResponseCodec
public interface ResponseCodec<T>ConvertsResponseobjects to and from another representation.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Responsedecode(T encodedResponse)Decodes a response.Tencode(java.util.function.Supplier<T> factory, Response response)Encodes a response.
-
-
-
Method Detail
-
encode
T encode(java.util.function.Supplier<T> factory, Response response)
Encodes a response.- Parameters:
factory- creates a new instance ofT.response- the response to encode.- Returns:
- the encoded response.
- Throws:
java.lang.IllegalArgumentException- If the object cannot be encoded.
-
-