public class AGRawStreamer extends AGResponseHandler
Constructor and Description |
---|
AGRawStreamer()
Creates a streaming handler that does not specify the MIME type.
|
AGRawStreamer(BooleanQueryResultFormat format)
Creates a streaming handler that requests results in specified boolean format.
|
AGRawStreamer(RDFFormat format)
Creates a streaming handler that requests results in specified RDF format.
|
AGRawStreamer(String mimeType)
Creates a streaming handler.
|
AGRawStreamer(TupleQueryResultFormat format)
Creates a streaming handler that requests results in specified tuple format.
|
Modifier and Type | Method and Description |
---|---|
InputStream |
getStream()
Gets the data stream contaning the server's response.
|
void |
handleResponse(org.apache.http.HttpResponse httpResponse,
org.apache.http.client.methods.HttpUriRequest httpUriRequest) |
boolean |
releaseConnection()
For most responses, AGHTTPClient releases resources after
calling
AGResponseHandler.handleResponse(HttpResponse, HttpUriRequest) ; this can be
overridden in subclasses that stream results. |
getRequestMIMEType
public AGRawStreamer(String mimeType)
mimeType
- MIME type to be requested from the server.public AGRawStreamer()
The server is free to return any content type.
public AGRawStreamer(RDFFormat format)
format
- Format to return the data in.public AGRawStreamer(TupleQueryResultFormat format)
format
- Format to return the data in.public AGRawStreamer(BooleanQueryResultFormat format)
format
- Format to return the data in.public InputStream getStream() throws AGHttpException
AGHttpException
- if an error happens when decoding
the response (e.g. if the server sent an
invalid GZIP stream).public void handleResponse(org.apache.http.HttpResponse httpResponse, org.apache.http.client.methods.HttpUriRequest httpUriRequest) throws IOException, AGHttpException
handleResponse
in class AGResponseHandler
IOException
AGHttpException
public boolean releaseConnection()
AGResponseHandler
AGResponseHandler.handleResponse(HttpResponse, HttpUriRequest)
; this can be
overridden in subclasses that stream results.releaseConnection
in class AGResponseHandler
Copyright © 2024 Franz Inc.. All rights reserved.