public class AbstractHttpRequestEmitter extends Object implements HttpRequestEmitter
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.http.impl.client.CloseableHttpClient |
client |
protected boolean |
closeClient
Deprecated.
|
static String |
CONNECTION_ABORT_INDICATING_EXCPETION_MSG |
protected String |
name |
| Constructor and Description |
|---|
AbstractHttpRequestEmitter() |
AbstractHttpRequestEmitter(org.apache.http.impl.client.CloseableHttpClient client) |
AbstractHttpRequestEmitter(String name) |
AbstractHttpRequestEmitter(String name,
org.apache.http.impl.client.CloseableHttpClient client) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected void |
closeRequest(org.apache.http.client.methods.HttpUriRequest request) |
protected org.apache.http.client.methods.HttpGet |
createGetRequest(String url)
Creates a GET request and registers it with the
HttpManagement
instance. |
protected org.apache.http.client.methods.HttpHead |
createHeadRequest(String url)
Creates a HEAD request and registers it with the
HttpManagement
instance. |
protected org.apache.http.client.methods.HttpPost |
createPostRequest(String url)
Creates a POST request and registers it with the
HttpManagement
instance. |
protected org.apache.http.impl.client.CloseableHttpClient |
getClient() |
String |
getName() |
void |
interrupt(org.apache.http.client.methods.HttpUriRequest request) |
protected boolean |
isCloseClient() |
protected org.apache.http.client.methods.CloseableHttpResponse |
sendRequest(org.apache.http.client.methods.HttpUriRequest request) |
protected org.apache.http.client.methods.CloseableHttpResponse |
sendRequest(org.apache.http.client.methods.HttpUriRequest request,
boolean retry) |
protected void |
setClient(org.apache.http.impl.client.CloseableHttpClient client) |
protected void |
setCloseClient(boolean closeClient)
Deprecated.
|
void |
setName(String name) |
public static final String CONNECTION_ABORT_INDICATING_EXCPETION_MSG
protected org.apache.http.impl.client.CloseableHttpClient client
@Deprecated protected boolean closeClient
protected String name
public AbstractHttpRequestEmitter()
public AbstractHttpRequestEmitter(org.apache.http.impl.client.CloseableHttpClient client)
public AbstractHttpRequestEmitter(String name)
public AbstractHttpRequestEmitter(String name, org.apache.http.impl.client.CloseableHttpClient client)
public void interrupt(org.apache.http.client.methods.HttpUriRequest request)
throws UnsupportedOperationException
interrupt in interface HttpRequestEmitterUnsupportedOperationExceptionprotected org.apache.http.client.methods.HttpPost createPostRequest(String url) throws IllegalArgumentException
HttpManagement
instance.url - the URL to which the request will be sendIllegalArgumentException - if the url is not validprotected org.apache.http.client.methods.HttpGet createGetRequest(String url) throws IllegalArgumentException
HttpManagement
instance.url - the URL to which the request will be sendIllegalArgumentException - if the url is not validprotected org.apache.http.client.methods.HttpHead createHeadRequest(String url) throws IllegalArgumentException
HttpManagement
instance.url - the URL to which the request will be sendIllegalArgumentException - if the url is not validprotected void closeRequest(org.apache.http.client.methods.HttpUriRequest request)
protected org.apache.http.impl.client.CloseableHttpClient getClient()
protected void setClient(org.apache.http.impl.client.CloseableHttpClient client)
protected boolean isCloseClient()
@Deprecated protected void setCloseClient(boolean closeClient)
protected org.apache.http.client.methods.CloseableHttpResponse sendRequest(org.apache.http.client.methods.HttpUriRequest request)
throws GerbilException
GerbilExceptionprotected org.apache.http.client.methods.CloseableHttpResponse sendRequest(org.apache.http.client.methods.HttpUriRequest request,
boolean retry)
throws GerbilException
GerbilExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic String getName()
getName in interface HttpRequestEmitterpublic void setName(String name)
setName in interface HttpRequestEmitterCopyright © 2014–2017. All rights reserved.