public class HttpClientTransport extends HttpTransportSupport
Transport which uses the
Apache HTTP Client
library| Modifier and Type | Field and Description |
|---|---|
protected boolean |
canSendCompressed |
static int |
MAX_CLIENT_TIMEOUT |
| Constructor and Description |
|---|
HttpClientTransport(TextWireFormat wireFormat,
java.net.URI remoteUrl) |
| Modifier and Type | Method and Description |
|---|---|
FutureResponse |
asyncRequest(java.lang.Object command) |
protected void |
configureMethod(org.apache.http.message.AbstractHttpMessage method) |
protected org.apache.http.conn.ClientConnectionManager |
createClientConnectionManager() |
protected org.apache.http.client.HttpClient |
createHttpClient() |
protected void |
doStart() |
protected void |
doStop(ServiceStopper stopper) |
int |
getMinSendAsCompressedSize() |
int |
getReceiveCounter() |
org.apache.http.client.HttpClient |
getReceiveHttpClient() |
org.apache.http.client.HttpClient |
getSendHttpClient() |
int |
getSoTimeout() |
boolean |
isTrace() |
boolean |
isUseCompression() |
void |
oneway(java.lang.Object command) |
java.lang.Object |
request(java.lang.Object command) |
void |
run() |
void |
setMinSendAsCompressedSize(int minSendAsCompressedSize)
Sets the minimum size that must be exceeded on a send before compression is used if
the useCompression option is specified.
|
void |
setReceiveHttpClient(org.apache.http.client.HttpClient receiveHttpClient) |
void |
setSendHttpClient(org.apache.http.client.HttpClient sendHttpClient) |
void |
setSoTimeout(int soTimeout) |
void |
setTrace(boolean trace) |
void |
setUseCompression(boolean useCompression) |
getProxyHost, getProxyPassword, getProxyPort, getProxyUser, getRemoteAddress, getRemoteUrl, getTextWireFormat, setProxyHost, setProxyPassword, setProxyPort, setProxyUser, setTextWireFormat, toStringgetStackSize, isDaemon, setDaemon, setStackSizeasyncRequest, checkStarted, doConsume, getTransportListener, isConnected, isDisposed, isFaultTolerant, isReconnectSupported, isUpdateURIsSupported, narrow, onException, reconnect, request, setTransportListener, updateURIsaddServiceListener, dispose, isStarted, isStopped, isStopping, postStop, preStart, removeServiceListener, start, stoppublic static final int MAX_CLIENT_TIMEOUT
protected boolean canSendCompressed
public HttpClientTransport(TextWireFormat wireFormat, java.net.URI remoteUrl)
public FutureResponse asyncRequest(java.lang.Object command) throws java.io.IOException
java.io.IOExceptionpublic void oneway(java.lang.Object command)
throws java.io.IOException
java.io.IOExceptionpublic java.lang.Object request(java.lang.Object command)
throws java.io.IOException
request in interface Transportrequest in class TransportSupportjava.io.IOExceptionpublic void run()
public org.apache.http.client.HttpClient getSendHttpClient()
public void setSendHttpClient(org.apache.http.client.HttpClient sendHttpClient)
public org.apache.http.client.HttpClient getReceiveHttpClient()
public void setReceiveHttpClient(org.apache.http.client.HttpClient receiveHttpClient)
protected void doStart()
throws java.lang.Exception
doStart in class TransportThreadSupportjava.lang.Exceptionprotected void doStop(ServiceStopper stopper) throws java.lang.Exception
doStop in class ServiceSupportjava.lang.Exceptionprotected org.apache.http.client.HttpClient createHttpClient()
protected org.apache.http.conn.ClientConnectionManager createClientConnectionManager()
protected void configureMethod(org.apache.http.message.AbstractHttpMessage method)
public boolean isTrace()
public void setTrace(boolean trace)
public int getReceiveCounter()
public int getSoTimeout()
public void setSoTimeout(int soTimeout)
public void setUseCompression(boolean useCompression)
public boolean isUseCompression()
public int getMinSendAsCompressedSize()
public void setMinSendAsCompressedSize(int minSendAsCompressedSize)
minSendAsCompressedSize - Copyright © 2005-2016 Red Hat, Inc.. All Rights Reserved.