public class HttpConnector extends Object implements Connector
HttpClient
instance.Modifier and Type | Field and Description |
---|---|
protected String |
basicAuth |
protected org.apache.http.protocol.HttpContext |
ctx |
protected org.apache.http.client.HttpClient |
http |
protected int |
httpConnectionTimeout
Timeout in milliseconds for the socket, connection manager and connection used by
http . |
Constructor and Description |
---|
HttpConnector(org.apache.http.client.HttpClient http) |
HttpConnector(org.apache.http.client.HttpClient http,
org.apache.http.protocol.HttpContext ctx) |
HttpConnector(org.apache.http.client.HttpClient http,
org.apache.http.protocol.HttpContext ctx,
int httpConnectionTimeout) |
HttpConnector(org.apache.http.client.HttpClient http,
int httpConnectionTimeout)
Allows to set a timeout for the HTTP connection to avoid infinite or quite long waiting periods if:
Nuxeo is broken or running into an infinite loop
the network doesn't respond at all
|
Modifier and Type | Method and Description |
---|---|
Object |
execute(Request request) |
protected Object |
execute(Request request,
org.apache.http.client.methods.HttpUriRequest httpReq) |
protected org.apache.http.HttpResponse |
executeRequestWithTimeout(org.apache.http.client.methods.HttpUriRequest httpReq) |
protected final org.apache.http.client.HttpClient http
protected final int httpConnectionTimeout
http
.protected final org.apache.http.protocol.HttpContext ctx
public HttpConnector(org.apache.http.client.HttpClient http)
public HttpConnector(org.apache.http.client.HttpClient http, int httpConnectionTimeout)
public HttpConnector(org.apache.http.client.HttpClient http, org.apache.http.protocol.HttpContext ctx)
public HttpConnector(org.apache.http.client.HttpClient http, org.apache.http.protocol.HttpContext ctx, int httpConnectionTimeout)
HttpConnector(HttpClient, long)}
protected Object execute(Request request, org.apache.http.client.methods.HttpUriRequest httpReq) throws RemoteException, IOException
RemoteException
IOException
protected org.apache.http.HttpResponse executeRequestWithTimeout(org.apache.http.client.methods.HttpUriRequest httpReq) throws IOException
IOException
Copyright © 2015 Nuxeo SA. All rights reserved.