Class JettyContentExchange9

  • All Implemented Interfaces:
    org.apache.camel.component.jetty.JettyContentExchange

    public class JettyContentExchange9
    extends Object
    implements org.apache.camel.component.jetty.JettyContentExchange
    Jetty specific exchange which keeps track of the request and response.
    • Constructor Detail

      • JettyContentExchange9

        public JettyContentExchange9()
    • Method Detail

      • init

        public void init​(org.apache.camel.Exchange exchange,
                         org.apache.camel.component.jetty.JettyHttpBinding jettyBinding,
                         org.eclipse.jetty.client.HttpClient client,
                         org.apache.camel.AsyncCallback callback)
        Specified by:
        init in interface org.apache.camel.component.jetty.JettyContentExchange
      • onRequestComplete

        protected void onRequestComplete()
      • onResponseComplete

        protected void onResponseComplete​(org.eclipse.jetty.client.api.Result result,
                                          byte[] content)
      • onExpire

        protected void onExpire()
      • onException

        protected void onException​(Throwable ex)
      • onConnectionFailed

        protected void onConnectionFailed​(Throwable ex)
      • getBody

        public byte[] getBody()
        Specified by:
        getBody in interface org.apache.camel.component.jetty.JettyContentExchange
      • getUrl

        public String getUrl()
        Specified by:
        getUrl in interface org.apache.camel.component.jetty.JettyContentExchange
      • closeRequestContentSource

        protected void closeRequestContentSource()
      • doTaskCompleted

        protected void doTaskCompleted​(Throwable ex)
      • setRequestContentType

        public void setRequestContentType​(String contentType)
        Specified by:
        setRequestContentType in interface org.apache.camel.component.jetty.JettyContentExchange
      • getResponseStatus

        public int getResponseStatus()
        Specified by:
        getResponseStatus in interface org.apache.camel.component.jetty.JettyContentExchange
      • setMethod

        public void setMethod​(String method)
        Specified by:
        setMethod in interface org.apache.camel.component.jetty.JettyContentExchange
      • setTimeout

        public void setTimeout​(long timeout)
        Specified by:
        setTimeout in interface org.apache.camel.component.jetty.JettyContentExchange
      • setURL

        public void setURL​(String url)
        Specified by:
        setURL in interface org.apache.camel.component.jetty.JettyContentExchange
      • setRequestContent

        public void setRequestContent​(byte[] byteArray)
        Specified by:
        setRequestContent in interface org.apache.camel.component.jetty.JettyContentExchange
      • setRequestContent

        public void setRequestContent​(InputStream ins)
        Specified by:
        setRequestContent in interface org.apache.camel.component.jetty.JettyContentExchange
      • setRequestContent

        public void setRequestContent​(InputStream ins,
                                      int contentLength)
        Specified by:
        setRequestContent in interface org.apache.camel.component.jetty.JettyContentExchange
      • addRequestHeader

        public void addRequestHeader​(String key,
                                     String s)
        Specified by:
        addRequestHeader in interface org.apache.camel.component.jetty.JettyContentExchange
      • send

        public void send​(org.eclipse.jetty.client.HttpClient client)
                  throws IOException
        Specified by:
        send in interface org.apache.camel.component.jetty.JettyContentExchange
        Throws:
        IOException
      • setResponse

        protected void setResponse​(org.eclipse.jetty.client.api.Response response)
      • getResponseContentBytes

        public byte[] getResponseContentBytes()
        Specified by:
        getResponseContentBytes in interface org.apache.camel.component.jetty.JettyContentExchange
      • getRequestHeaders

        public Map<String,​Collection<String>> getRequestHeaders()
        Specified by:
        getRequestHeaders in interface org.apache.camel.component.jetty.JettyContentExchange
      • getResponseHeaders

        public Map<String,​Collection<String>> getResponseHeaders()
        Specified by:
        getResponseHeaders in interface org.apache.camel.component.jetty.JettyContentExchange
      • setSupportRedirect

        public void setSupportRedirect​(boolean supportRedirect)
        Specified by:
        setSupportRedirect in interface org.apache.camel.component.jetty.JettyContentExchange