public class JettyResponseListener
extends org.eclipse.jetty.client.util.InputStreamResponseListener
Response input stream.| Constructor and Description |
|---|
JettyResponseListener(org.eclipse.jetty.client.api.Request request,
long queryTimeoutMillis) |
| Modifier and Type | Method and Description |
|---|---|
void |
abort()
Abort the request/response.
|
void |
abort(Throwable cause)
Abort the request/response.
|
String |
getContentEncoding()
Return the content encoding specified by the
charset MIME
parameter for the Content-Type header and null
if that MIME type parameter was not specified. |
String |
getContentType()
Return the value of the
Content-Type header. |
org.eclipse.jetty.http.HttpFields |
getHeaders()
The http headers.
|
InputStream |
getInputStream() |
String |
getReason()
The http reason line.
|
String |
getResponseBody()
Return the response body as a string.
|
int |
getStatus()
The http status code.
|
await, get, onComplete, onContent, onFailure, onHeaders, onSuccesspublic JettyResponseListener(org.eclipse.jetty.client.api.Request request,
long queryTimeoutMillis)
request - queryTimeoutMillis - the timeout in milliseconds (if non-positive, then an infinite
timeout is used).public String getContentType() throws IOException
Content-Type header.IOExceptionpublic String getContentEncoding() throws IOException
charset MIME
parameter for the Content-Type header and null
if that MIME type parameter was not specified.
Note: Per Section 3.7.1 Canonicalization and Text Defaults of the HTTP 1.1 specification:
charset parameter was
specified and otherwise null.IOExceptionpublic int getStatus()
throws IOException
IOExceptionpublic String getReason() throws IOException
IOExceptionpublic org.eclipse.jetty.http.HttpFields getHeaders()
throws IOException
IOExceptionpublic String getResponseBody() throws IOException
IOExceptionpublic InputStream getInputStream()
getInputStream in class org.eclipse.jetty.client.util.InputStreamResponseListenerpublic void abort()
InputStream is closed.public void abort(Throwable cause)
InputStream is closed.cause - The cause (required).Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.