public class DefaultCxfRsBinding extends Object implements CxfRsBinding, org.apache.camel.spi.HeaderFilterStrategyAware
| Constructor and Description |
|---|
DefaultCxfRsBinding() |
| Modifier and Type | Method and 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)
This method call Message.getBody(
MessageContentsList) to allow
an appropriate converter to kick in even through we only read the first
element off the MessageContextList. |
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). |
Map<String,Object> |
bindResponseHeadersToCamelHeaders(Object response,
org.apache.camel.Exchange camelExchange)
We will return an empty Map unless the response parameter is a
Response object. |
Object |
bindResponseToCamelBody(Object response,
org.apache.camel.Exchange camelExchange)
By default, we just return the response object.
|
protected void |
copyOperationResourceInfoStack(org.apache.cxf.message.Message cxfMessage,
org.apache.camel.Message camelMessage) |
protected void |
copyProtocolHeader(org.apache.cxf.message.Message cxfMessage,
org.apache.camel.Message camelMessage,
org.apache.camel.Exchange camelExchange) |
org.apache.camel.spi.HeaderFilterStrategy |
getHeaderFilterStrategy() |
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.
|
protected void |
setCharsetWithContentType(org.apache.camel.Exchange camelExchange) |
void |
setHeaderFilterStrategy(org.apache.camel.spi.HeaderFilterStrategy strategy) |
public Object populateCxfRsResponseFromExchange(org.apache.camel.Exchange camelExchange, org.apache.cxf.message.Exchange cxfExchange) throws Exception
CxfRsBindingpopulateCxfRsResponseFromExchange in interface CxfRsBindingcamelExchange - camel exchange objectcxfExchange - cxf exchange objectException - can be thrown if error in the binding processpublic void populateExchangeFromCxfRsRequest(org.apache.cxf.message.Exchange cxfExchange,
org.apache.camel.Exchange camelExchange,
Method method,
Object[] paramArray)
CxfRsBindingpopulateExchangeFromCxfRsRequest in interface CxfRsBindingcxfExchange - cxf exchange objectcamelExchange - camel exchange objectmethod - the method which is need for the camel componentparamArray - the parameter list for the method invocationprotected void setCharsetWithContentType(org.apache.camel.Exchange camelExchange)
public javax.ws.rs.core.MultivaluedMap<String,String> bindCamelHeadersToRequestHeaders(Map<String,Object> camelHeaders, org.apache.camel.Exchange camelExchange) throws Exception
CxfRsBindingWebClient APIs.bindCamelHeadersToRequestHeaders in interface CxfRsBindingcamelHeaders - the source headerscamelExchange - the Camel exchangeException - can be thrown if error in the binding processpublic Object bindCamelMessageBodyToRequestBody(org.apache.camel.Message camelMessage, org.apache.camel.Exchange camelExchange) throws Exception
MessageContentsList) to allow
an appropriate converter to kick in even through we only read the first
element off the MessageContextList. If that returns null, we check
the body to see if it is a List or an array and then return the first
element. If that fails, we will simply return the object.bindCamelMessageBodyToRequestBody in interface CxfRsBindingcamelMessage - the source messagecamelExchange - the Camel exchangeException - can be thrown if error in the binding processpublic Map<String,Object> bindResponseHeadersToCamelHeaders(Object response, org.apache.camel.Exchange camelExchange) throws Exception
Response object.bindResponseHeadersToCamelHeaders in interface CxfRsBindingresponse - the responsecamelExchange - the exchangeException - can be thrown if error in the binding processpublic javax.ws.rs.client.Entity<Object> bindCamelMessageToRequestEntity(Object body, org.apache.camel.Message camelMessage, org.apache.camel.Exchange camelExchange) throws Exception
CxfRsBindingEntity that gets passed to AsyncInvoker.method(java.lang.String, javax.ws.rs.client.Entity, javax.ws.rs.client.InvocationCallback).bindCamelMessageToRequestEntity in interface CxfRsBindingbody - the message bodycamelMessage - the source messagecamelExchange - the Camel exchangeEntity to useException - can be thrown if error in the binding processpublic Object bindResponseToCamelBody(Object response, org.apache.camel.Exchange camelExchange) throws Exception
bindResponseToCamelBody in interface CxfRsBindingresponse - the responsecamelExchange - the exchangeException - can be thrown if error in the binding processpublic org.apache.camel.spi.HeaderFilterStrategy getHeaderFilterStrategy()
getHeaderFilterStrategy in interface org.apache.camel.spi.HeaderFilterStrategyAwarepublic void setHeaderFilterStrategy(org.apache.camel.spi.HeaderFilterStrategy strategy)
setHeaderFilterStrategy in interface org.apache.camel.spi.HeaderFilterStrategyAwareprotected void copyProtocolHeader(org.apache.cxf.message.Message cxfMessage,
org.apache.camel.Message camelMessage,
org.apache.camel.Exchange camelExchange)
protected void copyOperationResourceInfoStack(org.apache.cxf.message.Message cxfMessage,
org.apache.camel.Message camelMessage)
Apache Camel