org.apache.activemq.transport.http
Class HttpClientTransport

java.lang.Object
  extended by org.apache.activemq.util.ServiceSupport
      extended by org.apache.activemq.transport.TransportSupport
          extended by org.apache.activemq.transport.TransportThreadSupport
              extended by org.apache.activemq.transport.http.HttpTransportSupport
                  extended by org.apache.activemq.transport.http.HttpClientTransport
All Implemented Interfaces:
java.lang.Runnable, Service, Transport
Direct Known Subclasses:
HttpsClientTransport

public class HttpClientTransport
extends HttpTransportSupport

A HTTP TransportChannel which uses the commons-httpclient library


Field Summary
static int MAX_CLIENT_TIMEOUT
           
 
Constructor Summary
HttpClientTransport(TextWireFormat wireFormat, java.net.URI remoteUrl)
           
 
Method Summary
 FutureResponse asyncRequest(java.lang.Object command)
           
protected  void configureMethod(org.apache.http.message.AbstractHttpMessage method)
           
protected  org.apache.http.client.HttpClient createHttpClient()
           
protected  void doStart()
           
protected  void doStop(ServiceStopper stopper)
           
 int getReceiveCounter()
           
 org.apache.http.client.HttpClient getReceiveHttpClient()
           
 org.apache.http.client.HttpClient getSendHttpClient()
           
 int getSoTimeout()
           
 boolean isTrace()
           
 void oneway(java.lang.Object command)
           
 java.lang.Object request(java.lang.Object command)
           
 void run()
           
 void setReceiveHttpClient(org.apache.http.client.HttpClient receiveHttpClient)
           
 void setSendHttpClient(org.apache.http.client.HttpClient sendHttpClient)
           
 void setSoTimeout(int soTimeout)
           
 void setTrace(boolean trace)
           
 
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, removeServiceListener, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.activemq.Service
start, stop
 

Field Detail

MAX_CLIENT_TIMEOUT

public static final int MAX_CLIENT_TIMEOUT
See Also:
Constant Field Values
Constructor Detail

HttpClientTransport

public HttpClientTransport(TextWireFormat wireFormat,
                           java.net.URI remoteUrl)
Method Detail

asyncRequest

public FutureResponse asyncRequest(java.lang.Object command)
                            throws java.io.IOException
Throws:
java.io.IOException

oneway

public void oneway(java.lang.Object command)
            throws java.io.IOException
Throws:
java.io.IOException

request

public java.lang.Object request(java.lang.Object command)
                         throws java.io.IOException
Specified by:
request in interface Transport
Overrides:
request in class TransportSupport
Throws:
java.io.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 java.lang.Exception
Overrides:
doStart in class TransportThreadSupport
Throws:
java.lang.Exception

doStop

protected void doStop(ServiceStopper stopper)
               throws java.lang.Exception
Specified by:
doStop in class ServiceSupport
Throws:
java.lang.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)


Copyright © 2005-2012 FuseSource, Corp.. All Rights Reserved.