Interface CxfRsBinding

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      javax.ws.rs.core.MultivaluedMap<String,​String> bindCamelHeadersToRequestHeaders​(Map<String,​Object> camelHeaders, org.apache.camel.Exchange camelExchange)
      Bind the camel headers to request headers that gets passed to CXF RS WebClient APIs.
      Object bindCamelMessageBodyToRequestBody​(org.apache.camel.Message camelMessage, org.apache.camel.Exchange camelExchange)
      Bind the camel in message body to a request body that gets passed to CXF RS WebClient APIs.
      javax.ws.rs.client.Entity<Object> bindCamelMessageToRequestEntity​(Object body, org.apache.camel.Message camelMessage, org.apache.camel.Exchange camelExchange)
      Bind the Camel message to a request Entity that gets passed to AsyncInvoker.method(java.lang.String, javax.ws.rs.client.Entity, javax.ws.rs.client.InvocationCallback).
      javax.ws.rs.client.Entity<Object> bindCamelMessageToRequestEntity​(Object body, org.apache.camel.Message camelMessage, org.apache.camel.Exchange camelExchange, org.apache.cxf.jaxrs.client.WebClient webClient)
      Bind the Camel message to a request Entity that gets passed to AsyncInvoker.method(java.lang.String, javax.ws.rs.client.Entity, javax.ws.rs.client.InvocationCallback).
      Map<String,​Object> bindResponseHeadersToCamelHeaders​(Object response, org.apache.camel.Exchange camelExchange)
      Bind the response headers to camel out headers.
      Object bindResponseToCamelBody​(Object response, org.apache.camel.Exchange camelExchange)
      Bind the HTTP response body to camel out body
      Object populateCxfRsResponseFromExchange​(org.apache.camel.Exchange camelExchange, org.apache.cxf.message.Exchange cxfExchange)
      Populate the CxfRsResponse object from the camel exchange
      void populateExchangeFromCxfRsRequest​(org.apache.cxf.message.Exchange cxfExchange, org.apache.camel.Exchange camelExchange, Method method, Object[] paramArray)
      Populate the camel exchange from the CxfRsRequest, the exchange will be consumed by the processor which the CxfRsConsumer attached.
    • Method Detail

      • populateExchangeFromCxfRsRequest

        void populateExchangeFromCxfRsRequest​(org.apache.cxf.message.Exchange cxfExchange,
                                              org.apache.camel.Exchange camelExchange,
                                              Method method,
                                              Object[] paramArray)
        Populate the camel exchange from the CxfRsRequest, the exchange will be consumed by the processor which the CxfRsConsumer attached.
        Parameters:
        camelExchange - camel exchange object
        cxfExchange - cxf exchange object
        method - the method which is need for the camel component
        paramArray - the parameter list for the method invocation
      • populateCxfRsResponseFromExchange

        Object populateCxfRsResponseFromExchange​(org.apache.camel.Exchange camelExchange,
                                                 org.apache.cxf.message.Exchange cxfExchange)
                                          throws Exception
        Populate the CxfRsResponse object from the camel exchange
        Parameters:
        camelExchange - camel exchange object
        cxfExchange - cxf exchange object
        Returns:
        the response object
        Throws:
        Exception - can be thrown if error in the binding process
      • bindCamelMessageBodyToRequestBody

        Object bindCamelMessageBodyToRequestBody​(org.apache.camel.Message camelMessage,
                                                 org.apache.camel.Exchange camelExchange)
                                          throws Exception
        Bind the camel in message body to a request body that gets passed to CXF RS WebClient APIs.
        Parameters:
        camelMessage - the source message
        camelExchange - the Camel exchange
        Returns:
        the request object to be passed to invoke a WebClient
        Throws:
        Exception - can be thrown if error in the binding process
      • bindCamelHeadersToRequestHeaders

        javax.ws.rs.core.MultivaluedMap<String,​String> bindCamelHeadersToRequestHeaders​(Map<String,​Object> camelHeaders,
                                                                                              org.apache.camel.Exchange camelExchange)
                                                                                       throws Exception
        Bind the camel headers to request headers that gets passed to CXF RS WebClient APIs.
        Parameters:
        camelHeaders - the source headers
        camelExchange - the Camel exchange
        Returns:
        the headers
        Throws:
        Exception - can be thrown if error in the binding process
      • bindResponseToCamelBody

        Object bindResponseToCamelBody​(Object response,
                                       org.apache.camel.Exchange camelExchange)
                                throws Exception
        Bind the HTTP response body to camel out body
        Parameters:
        response - the response
        camelExchange - the exchange
        Returns:
        the object to be set in the Camel out message body
        Throws:
        Exception - can be thrown if error in the binding process
      • bindResponseHeadersToCamelHeaders

        Map<String,​Object> bindResponseHeadersToCamelHeaders​(Object response,
                                                                   org.apache.camel.Exchange camelExchange)
                                                            throws Exception
        Bind the response headers to camel out headers.
        Parameters:
        response - the response
        camelExchange - the exchange
        Returns:
        headers to be set in the Camel out message
        Throws:
        Exception - can be thrown if error in the binding process
      • bindCamelMessageToRequestEntity

        javax.ws.rs.client.Entity<Object> bindCamelMessageToRequestEntity​(Object body,
                                                                          org.apache.camel.Message camelMessage,
                                                                          org.apache.camel.Exchange camelExchange)
                                                                   throws Exception
        Bind the Camel message to a request Entity that gets passed to AsyncInvoker.method(java.lang.String, javax.ws.rs.client.Entity, javax.ws.rs.client.InvocationCallback).
        Parameters:
        camelMessage - the source message
        camelExchange - the Camel exchange
        body - the message body
        Returns:
        the Entity to use
        Throws:
        Exception - can be thrown if error in the binding process
      • bindCamelMessageToRequestEntity

        javax.ws.rs.client.Entity<Object> bindCamelMessageToRequestEntity​(Object body,
                                                                          org.apache.camel.Message camelMessage,
                                                                          org.apache.camel.Exchange camelExchange,
                                                                          org.apache.cxf.jaxrs.client.WebClient webClient)
                                                                   throws Exception
        Bind the Camel message to a request Entity that gets passed to AsyncInvoker.method(java.lang.String, javax.ws.rs.client.Entity, javax.ws.rs.client.InvocationCallback).
        Parameters:
        camelMessage - the source message
        camelExchange - the Camel exchange
        body - the message body
        webClient - the CXF JAXRS WebClient
        Returns:
        the Entity to use
        Throws:
        Exception - can be thrown if error in the binding process