org.apache.camel.component.jetty
Class JettyContentExchange

java.lang.Object
  extended by org.eclipse.jetty.client.HttpExchange
      extended by org.eclipse.jetty.client.CachedExchange
          extended by org.eclipse.jetty.client.ContentExchange
              extended by org.apache.camel.component.jetty.JettyContentExchange

public class JettyContentExchange
extends org.eclipse.jetty.client.ContentExchange

Jetty specific exchange which keeps track of the the request and response.

Version:

Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.jetty.client.HttpExchange
org.eclipse.jetty.client.HttpExchange.CachedExchange, org.eclipse.jetty.client.HttpExchange.ContentExchange
 
Field Summary
 
Fields inherited from class org.eclipse.jetty.client.HttpExchange
STATUS_CANCELLED, STATUS_CANCELLING, STATUS_COMPLETED, STATUS_EXCEPTED, STATUS_EXPIRED, STATUS_PARSING_CONTENT, STATUS_PARSING_HEADERS, STATUS_SENDING_REQUEST, STATUS_START, STATUS_WAITING_FOR_COMMIT, STATUS_WAITING_FOR_CONNECTION, STATUS_WAITING_FOR_RESPONSE
 
Constructor Summary
JettyContentExchange(Exchange exchange, JettyHttpBinding jettyBinding, org.eclipse.jetty.client.HttpClient client)
           
 
Method Summary
protected  void doTaskCompleted()
           
protected  void doTaskCompleted(Throwable ex)
           
 String getBody()
           
 Map<String,String> getHeaders()
           
 String getUrl()
           
protected  void onConnectionFailed(Throwable ex)
           
protected  void onException(Throwable ex)
           
protected  void onExpire()
           
protected  void onRequestComplete()
           
protected  void onResponseComplete()
           
protected  void onResponseHeader(org.eclipse.jetty.io.Buffer name, org.eclipse.jetty.io.Buffer value)
           
 void setCallback(AsyncCallback callback)
           
 
Methods inherited from class org.eclipse.jetty.client.ContentExchange
getFileForUpload, getResponseContent, getResponseContentBytes, onResponseContent, onResponseStatus, onRetry, setFileForUpload
 
Methods inherited from class org.eclipse.jetty.client.CachedExchange
getResponseFields, getResponseStatus
 
Methods inherited from class org.eclipse.jetty.client.HttpExchange
addRequestHeader, addRequestHeader, cancel, cancelTimeout, configureListeners, expire, getAddress, getEventListener, getLocalAddress, getMethod, getRequestContent, getRequestContentChunk, getRequestContentSource, getRequestFields, getRetryStatus, getScheme, getStatus, getTimeout, getURI, getVersion, isDone, isDone, onRequestCommitted, onResponseHeaderComplete, onSwitchProtocol, reset, scheduleTimeout, setAddress, setConfigureListeners, setEventListener, setMethod, setRequestContent, setRequestContentSource, setRequestContentType, setRequestHeader, setRequestHeader, setRetryStatus, setScheme, setTimeout, setURI, setURL, setVersion, setVersion, toString, waitForDone, waitForStatus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JettyContentExchange

public JettyContentExchange(Exchange exchange,
                            JettyHttpBinding jettyBinding,
                            org.eclipse.jetty.client.HttpClient client)
Method Detail

setCallback

public void setCallback(AsyncCallback callback)

onResponseHeader

protected void onResponseHeader(org.eclipse.jetty.io.Buffer name,
                                org.eclipse.jetty.io.Buffer value)
                         throws IOException
Overrides:
onResponseHeader in class org.eclipse.jetty.client.ContentExchange
Throws:
IOException

onRequestComplete

protected void onRequestComplete()
                          throws IOException
Overrides:
onRequestComplete in class org.eclipse.jetty.client.HttpExchange
Throws:
IOException

onResponseComplete

protected void onResponseComplete()
                           throws IOException
Overrides:
onResponseComplete in class org.eclipse.jetty.client.HttpExchange
Throws:
IOException

onExpire

protected void onExpire()
Overrides:
onExpire in class org.eclipse.jetty.client.HttpExchange

onException

protected void onException(Throwable ex)
Overrides:
onException in class org.eclipse.jetty.client.HttpExchange

onConnectionFailed

protected void onConnectionFailed(Throwable ex)
Overrides:
onConnectionFailed in class org.eclipse.jetty.client.HttpExchange

getHeaders

public Map<String,String> getHeaders()

getBody

public String getBody()
               throws UnsupportedEncodingException
Throws:
UnsupportedEncodingException

getUrl

public String getUrl()

doTaskCompleted

protected void doTaskCompleted()

doTaskCompleted

protected void doTaskCompleted(Throwable ex)


Apache CAMEL