Class AbstractHttpResponseCodec

    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      Response decode​(org.openqa.selenium.remote.http.HttpResponse encodedResponse)
      Decodes a response.
      org.openqa.selenium.remote.http.HttpResponse encode​(java.util.function.Supplier<org.openqa.selenium.remote.http.HttpResponse> factory, Response response)
      Encodes the given response as a HTTP response message.
      protected abstract java.lang.Object getValueToEncode​(Response response)  
      protected abstract Response reconstructValue​(Response response)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AbstractHttpResponseCodec

        public AbstractHttpResponseCodec()
    • Method Detail

      • encode

        public org.openqa.selenium.remote.http.HttpResponse encode​(java.util.function.Supplier<org.openqa.selenium.remote.http.HttpResponse> factory,
                                                                   Response response)
        Encodes the given response as a HTTP response message. This method is guaranteed not to throw.
        Specified by:
        encode in interface ResponseCodec<org.openqa.selenium.remote.http.HttpResponse>
        Parameters:
        response - The response to encode.
        factory - creates a new instance of T.
        Returns:
        The encoded response.
      • getValueToEncode

        protected abstract java.lang.Object getValueToEncode​(Response response)
      • decode

        public Response decode​(org.openqa.selenium.remote.http.HttpResponse encodedResponse)
        Description copied from interface: ResponseCodec
        Decodes a response.
        Specified by:
        decode in interface ResponseCodec<org.openqa.selenium.remote.http.HttpResponse>
        Parameters:
        encodedResponse - the response to decode.
        Returns:
        the decoded response.
      • reconstructValue

        protected abstract Response reconstructValue​(Response response)