org.apache.activemq.transport.http
Class HttpClientTransport
java.lang.Object
org.apache.activemq.util.ServiceSupport
org.apache.activemq.transport.TransportSupport
org.apache.activemq.transport.TransportThreadSupport
org.apache.activemq.transport.http.HttpTransportSupport
org.apache.activemq.transport.http.HttpClientTransport
- All Implemented Interfaces:
- Runnable, org.apache.activemq.Service, org.apache.activemq.transport.Transport
- Direct Known Subclasses:
- HttpsClientTransport
public class HttpClientTransport
- extends HttpTransportSupport
A HTTP Transport which uses the
Apache HTTP Client
library
| Methods inherited from class org.apache.activemq.transport.http.HttpTransportSupport |
getProxyHost, getProxyPassword, getProxyPort, getProxyUser, getRemoteAddress, getRemoteUrl, getTextWireFormat, setProxyHost, setProxyPassword, setProxyPort, setProxyUser, setTextWireFormat, toString |
| Methods inherited from class org.apache.activemq.transport.TransportThreadSupport |
getStackSize, isDaemon, setDaemon, setStackSize |
| Methods inherited from class org.apache.activemq.transport.TransportSupport |
asyncRequest, checkStarted, doConsume, getTransportListener, isConnected, isDisposed, isFaultTolerant, isReconnectSupported, isUpdateURIsSupported, narrow, onException, reconnect, request, setTransportListener, updateURIs |
| Methods inherited from class org.apache.activemq.util.ServiceSupport |
addServiceListener, dispose, isStarted, isStopped, isStopping, postStop, preStart, removeServiceListener, start, stop |
| Methods inherited from interface org.apache.activemq.Service |
start, stop |
MAX_CLIENT_TIMEOUT
public static final int MAX_CLIENT_TIMEOUT
- See Also:
- Constant Field Values
HttpClientTransport
public HttpClientTransport(TextWireFormat wireFormat,
URI remoteUrl)
asyncRequest
public org.apache.activemq.transport.FutureResponse asyncRequest(Object command)
throws IOException
- Throws:
IOException
oneway
public void oneway(Object command)
throws IOException
- Throws:
IOException
request
public Object request(Object command)
throws IOException
- Specified by:
request in interface org.apache.activemq.transport.Transport- Overrides:
request in class org.apache.activemq.transport.TransportSupport
- Throws:
IOException
run
public void run()
getSendHttpClient
public org.apache.http.client.HttpClient getSendHttpClient()
setSendHttpClient
public void setSendHttpClient(org.apache.http.client.HttpClient sendHttpClient)
getReceiveHttpClient
public org.apache.http.client.HttpClient getReceiveHttpClient()
setReceiveHttpClient
public void setReceiveHttpClient(org.apache.http.client.HttpClient receiveHttpClient)
doStart
protected void doStart()
throws Exception
- Overrides:
doStart in class org.apache.activemq.transport.TransportThreadSupport
- Throws:
Exception
doStop
protected void doStop(org.apache.activemq.util.ServiceStopper stopper)
throws Exception
- Specified by:
doStop in class org.apache.activemq.util.ServiceSupport
- Throws:
Exception
createHttpClient
protected org.apache.http.client.HttpClient createHttpClient()
configureMethod
protected void configureMethod(org.apache.http.message.AbstractHttpMessage method)
isTrace
public boolean isTrace()
setTrace
public void setTrace(boolean trace)
getReceiveCounter
public int getReceiveCounter()
getSoTimeout
public int getSoTimeout()
setSoTimeout
public void setSoTimeout(int soTimeout)
setUseCompression
public void setUseCompression(boolean useCompression)
isUseCompression
public boolean isUseCompression()
getMinSendAsCompressedSize
public int getMinSendAsCompressedSize()
setMinSendAsCompressedSize
public 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. For very small payloads compression can be
inefficient compared to the transmission size savings.
Default value is 0.
- Parameters:
minSendAsCompressedSize -
Copyright © 2005-2012 The Apache Software Foundation. All Rights Reserved.