19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
20 * or visit www.oracle.com if you need additional information or have any |
20 * or visit www.oracle.com if you need additional information or have any |
21 * questions. |
21 * questions. |
22 */ |
22 */ |
23 |
23 |
24 import javax.net.ssl.SSLParameters; |
24 import javax.net.ssl.SSLSession; |
25 import java.net.URI; |
25 import java.net.URI; |
26 import java.util.Optional; |
26 import java.util.Optional; |
27 import java.net.http.HttpClient; |
27 import java.net.http.HttpClient; |
28 import java.net.http.HttpHeaders; |
28 import java.net.http.HttpHeaders; |
29 import java.net.http.HttpRequest; |
29 import java.net.http.HttpRequest; |
36 |
36 |
37 private final int statusCode; |
37 private final int statusCode; |
38 private final HttpRequest request; |
38 private final HttpRequest request; |
39 private final HttpHeaders headers; |
39 private final HttpHeaders headers; |
40 private final T body; |
40 private final T body; |
41 private final SSLParameters sslParameters; |
41 private final SSLSession sslSession; |
42 private final URI uri; |
42 private final URI uri; |
43 private final HttpClient.Version version; |
43 private final HttpClient.Version version; |
44 |
44 |
45 public FixedHttpResponse(int statusCode, |
45 public FixedHttpResponse(int statusCode, |
46 HttpRequest request, |
46 HttpRequest request, |
47 HttpHeaders headers, |
47 HttpHeaders headers, |
48 T body, |
48 T body, |
49 SSLParameters sslParameters, |
49 SSLSession sslSession, |
50 URI uri, |
50 URI uri, |
51 HttpClient.Version version) { |
51 HttpClient.Version version) { |
52 this.statusCode = statusCode; |
52 this.statusCode = statusCode; |
53 this.request = request; |
53 this.request = request; |
54 this.headers = headers; |
54 this.headers = headers; |
55 this.body = body; |
55 this.body = body; |
56 this.sslParameters = sslParameters; |
56 this.sslSession = sslSession; |
57 this.uri = uri; |
57 this.uri = uri; |
58 this.version = version; |
58 this.version = version; |
59 } |
59 } |
60 |
60 |
61 @Override |
61 @Override |