org.apache.activemq.transport.http
Class HttpTransport

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.HttpTransport
All Implemented Interfaces:
Runnable, Service, Transport
Direct Known Subclasses:
HttpsTransport

public class HttpTransport
extends HttpTransportSupport

Version:
$Revision$

Constructor Summary
HttpTransport(TextWireFormat wireFormat, URI remoteUrl)
           
 
Method Summary
protected  void configureConnection(HttpURLConnection connection)
           
protected  HttpURLConnection createReceiveConnection()
           
protected  HttpURLConnection createSendConnection()
           
protected  void doStart()
           
protected  void doStop(ServiceStopper stopper)
           
protected  HttpURLConnection getReceiveConnection()
           
 int getReceiveCounter()
          Returns a counter which gets incremented as data is read from the transport.
protected  URL getRemoteURL()
           
protected  HttpURLConnection getSendConnection()
           
 void oneway(Object o)
          A one way asynchronous send
 void run()
           
protected  void setReceiveConnection(HttpURLConnection conn)
           
protected  void setSendConnection(HttpURLConnection conn)
           
 
Methods inherited from class org.apache.activemq.transport.http.HttpTransportSupport
getProxyHost, getProxyPort, getRemoteAddress, getRemoteUrl, getTextWireFormat, setProxyHost, setProxyPort, 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, narrow, onException, reconnect, request, request, setTransportListener
 
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
 

Constructor Detail

HttpTransport

public HttpTransport(TextWireFormat wireFormat,
                     URI remoteUrl)
              throws MalformedURLException
Throws:
MalformedURLException
Method Detail

oneway

public void oneway(Object o)
            throws IOException
Description copied from interface: Transport
A one way asynchronous send

Throws:
IOException

run

public void run()

createSendConnection

protected HttpURLConnection createSendConnection()
                                          throws IOException
Throws:
IOException

createReceiveConnection

protected HttpURLConnection createReceiveConnection()
                                             throws IOException
Throws:
IOException

configureConnection

protected void configureConnection(HttpURLConnection connection)

getRemoteURL

protected URL getRemoteURL()

getSendConnection

protected HttpURLConnection getSendConnection()
                                       throws IOException
Throws:
IOException

getReceiveConnection

protected HttpURLConnection getReceiveConnection()
                                          throws IOException
Throws:
IOException

setSendConnection

protected void setSendConnection(HttpURLConnection conn)

setReceiveConnection

protected void setReceiveConnection(HttpURLConnection conn)

doStart

protected void doStart()
                throws Exception
Overrides:
doStart in class TransportThreadSupport
Throws:
Exception

doStop

protected void doStop(ServiceStopper stopper)
               throws Exception
Specified by:
doStop in class ServiceSupport
Throws:
Exception

getReceiveCounter

public int getReceiveCounter()
Description copied from interface: Transport
Returns a counter which gets incremented as data is read from the transport. It should only be used to determine if there is progress being made in reading the next command from the transport. The value may wrap into the negative numbers.

Returns:
a counter which gets incremented as data is read from the transport.


Copyright © 2005-2011 Apache Software Foundation. All Rights Reserved.