Package org.openqa.selenium.remote.codec
Class AbstractHttpResponseCodec
java.lang.Object
org.openqa.selenium.remote.codec.AbstractHttpResponseCodec
- All Implemented Interfaces:
ResponseCodec<org.openqa.selenium.remote.http.HttpResponse>
- Direct Known Subclasses:
W3CHttpResponseCodec
public abstract class AbstractHttpResponseCodec
extends Object
implements ResponseCodec<org.openqa.selenium.remote.http.HttpResponse>
A response codec usable as a base for both the JSON and W3C wire protocols.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondecode(org.openqa.selenium.remote.http.HttpResponse encodedResponse) Decodes a response.org.openqa.selenium.remote.http.HttpResponseEncodes the given response as an HTTP response message.protected abstract ObjectgetValueToEncode(Response response) protected abstract ResponsereconstructValue(Response response)
-
Constructor Details
-
AbstractHttpResponseCodec
public AbstractHttpResponseCodec()
-
-
Method Details
-
encode
public org.openqa.selenium.remote.http.HttpResponse encode(Supplier<org.openqa.selenium.remote.http.HttpResponse> factory, Response response) Encodes the given response as an HTTP response message. This method is guaranteed not to throw.- Specified by:
encodein interfaceResponseCodec<org.openqa.selenium.remote.http.HttpResponse>- Parameters:
factory- creates a new instance ofT.response- The response to encode.- Returns:
- The encoded response.
-
getValueToEncode
-
decode
Description copied from interface:ResponseCodecDecodes a response.- Specified by:
decodein interfaceResponseCodec<org.openqa.selenium.remote.http.HttpResponse>- Parameters:
encodedResponse- the response to decode.- Returns:
- the decoded response.
-
reconstructValue
-