@UriEndpoint(firstVersion="2.0.0",
scheme="cxfrs",
title="CXF-RS",
syntax="cxfrs:beanId:address",
label="rest",
lenientProperties=true)
public class CxfRsEndpoint
extends org.apache.camel.support.DefaultEndpoint
implements org.apache.camel.spi.HeaderFilterStrategyAware, org.apache.camel.Service
Modifier and Type | Field and Description |
---|---|
protected org.apache.cxf.Bus |
bus |
Constructor and Description |
---|
CxfRsEndpoint() |
CxfRsEndpoint(String endpointUri,
org.apache.camel.Component component) |
Modifier and Type | Method and Description |
---|---|
void |
addResourceClass(Class<?> resourceClass) |
protected void |
checkBeanType(Object object,
Class<?> clazz) |
org.apache.camel.Consumer |
createConsumer(org.apache.camel.Processor processor) |
org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean |
createJAXRSClientFactoryBean() |
org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean |
createJAXRSClientFactoryBean(String address) |
org.apache.cxf.jaxrs.JAXRSServerFactoryBean |
createJAXRSServerFactoryBean() |
org.apache.camel.Producer |
createProducer() |
protected void |
doInit() |
protected void |
doStop() |
String |
getAddress() |
String |
getBeanId() |
CxfRsBinding |
getBinding() |
BindingStyle |
getBindingStyle() |
org.apache.cxf.Bus |
getBus() |
CxfRsConfigurer |
getChainedCxfRsEndpointConfigurer() |
long |
getContinuationTimeout() |
org.apache.camel.http.base.cookie.CookieHandler |
getCookieHandler() |
CxfRsConfigurer |
getCxfRsConfigurer() |
List<org.apache.cxf.feature.Feature> |
getFeatures() |
org.apache.camel.spi.HeaderFilterStrategy |
getHeaderFilterStrategy() |
HostnameVerifier |
getHostnameVerifier() |
List<org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message>> |
getInFaultInterceptors() |
List<org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message>> |
getInInterceptors() |
int |
getLoggingSizeLimit() |
int |
getMaxClientCacheSize() |
String |
getModelRef() |
protected CxfRsConfigurer |
getNullSafeCxfRsEndpointConfigurer() |
List<org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message>> |
getOutFaultInterceptors() |
List<org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message>> |
getOutInterceptors() |
Map<String,String> |
getParameters() |
Map<String,Object> |
getProperties() |
List<?> |
getProviders() |
String |
getPublishedEndpointUrl() |
List<Class<?>> |
getResourceClasses() |
List<String> |
getSchemaLocations() |
List<?> |
getServiceBeans() |
org.apache.camel.support.jsse.SSLContextParameters |
getSslContextParameters() |
boolean |
isDefaultBus() |
boolean |
isHttpClientAPI() |
boolean |
isIgnoreDeleteMethodMessageBody() |
boolean |
isLenientProperties() |
boolean |
isLoggingFeatureEnabled()
This option enables CXF Logging Feature which writes inbound and outbound REST messages to log.
|
boolean |
isPerformInvocation() |
boolean |
isPropagateContexts() |
boolean |
isSkipFaultLogging() |
boolean |
isThrowExceptionOnFailure() |
protected org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean |
newJAXRSClientFactoryBean() |
protected org.apache.cxf.jaxrs.JAXRSServerFactoryBean |
newJAXRSServerFactoryBean() |
protected String |
resolvePropertyPlaceholders(String str) |
void |
setAddress(String address)
The service publish address.
|
void |
setBeanId(String beanId) |
void |
setBinding(CxfRsBinding binding)
To use a custom CxfBinding to control the binding between Camel Message and CXF Message.
|
void |
setBindingStyle(BindingStyle bindingStyle)
Sets how requests and responses will be mapped to/from Camel.
|
void |
setBus(org.apache.cxf.Bus bus)
To use a custom configured CXF Bus.
|
void |
setContinuationTimeout(long continuationTimeout)
This option is used to set the CXF continuation timeout which could be used in CxfConsumer by default when the
CXF server is using Jetty or Servlet transport.
|
void |
setCookieHandler(org.apache.camel.http.base.cookie.CookieHandler cookieHandler)
Configure a cookie handler to maintain a HTTP session
|
void |
setCxfRsConfigurer(CxfRsConfigurer configurer)
This option could apply the implementation of org.apache.camel.component.cxf.jaxrs.CxfRsEndpointConfigurer which
supports to configure the CXF endpoint in programmatic way.
|
void |
setDefaultBus(boolean isSetDefaultBus)
Will set the default bus when CXF endpoint create a bus by itself
|
void |
setFeatures(List<org.apache.cxf.feature.Feature> features)
Set the feature list to the CxfRs endpoint.
|
void |
setHeaderFilterStrategy(org.apache.camel.spi.HeaderFilterStrategy strategy)
To use a custom HeaderFilterStrategy to filter header to and from Camel message.
|
void |
setHostnameVerifier(HostnameVerifier hostnameVerifier)
The hostname verifier to be used.
|
void |
setHttpClientAPI(boolean clientAPI)
If it is true, the CxfRsProducer will use the HttpClientAPI to invoke the service.
|
void |
setIgnoreDeleteMethodMessageBody(boolean ignoreDeleteMethodMessageBody)
This option is used to tell CxfRsProducer to ignore the message body of the DELETE method when using HTTP API.
|
void |
setInFaultInterceptors(List<org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message>> interceptors)
Set the inFaultInterceptors to the CxfRs endpoint.
|
void |
setInInterceptors(List<org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message>> interceptors)
Set the inInterceptors to the CxfRs endpoint.
|
void |
setLoggingFeatureEnabled(boolean loggingFeatureEnabled) |
void |
setLoggingSizeLimit(int loggingSizeLimit)
To limit the total size of number of bytes the logger will output when logging feature has been enabled.
|
void |
setMaxClientCacheSize(int maxClientCacheSize)
This option allows you to configure the maximum size of the cache.
|
void |
setModelRef(String ref)
This option is used to specify the model file which is useful for the resource class without annotation.
|
void |
setOutFaultInterceptors(List<org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message>> interceptors)
Set the outFaultInterceptors to the CxfRs endpoint.
|
void |
setOutInterceptors(List<org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message>> interceptors)
Set the outInterceptor to the CxfRs endpoint.
|
void |
setParameters(Map<String,String> param) |
void |
setPerformInvocation(boolean performInvocation)
When the option is true, Camel will perform the invocation of the resource class instance and put the response
object into the exchange for further processing.
|
void |
setPropagateContexts(boolean propagateContexts)
When the option is true, JAXRS UriInfo, HttpHeaders, Request and SecurityContext contexts will be available to
custom CXFRS processors as typed Camel exchange properties.
|
void |
setProperties(Map<String,Object> properties) |
void |
setProvider(Object provider)
Set custom JAX-RS provider to the CxfRs endpoint.
|
void |
setProviders(List<?> providers)
Set custom JAX-RS provider(s) list to the CxfRs endpoint.
|
void |
setProviders(String providers)
Set custom JAX-RS provider(s) list which is looked up in the registry.
|
void |
setPublishedEndpointUrl(String publishedEndpointUrl)
This option can override the endpointUrl that published from the WADL which can be accessed with resource address
url plus ?_wadl
|
void |
setResourceClasses(Class<?>... classes) |
void |
setResourceClasses(List<Class<?>> resourceClasses)
The resource classes which you want to export as REST service.
|
void |
setSchemaLocation(String schema)
Sets the locations of the schema(s) which can be used to validate the incoming XML or JAXB-driven JSON.
|
void |
setSchemaLocations(List<String> schemas)
Sets the locations of the schema(s) which can be used to validate the incoming XML or JAXB-driven JSON.
|
void |
setServiceBean(Object bean) |
void |
setServiceBeans(List<?> beans) |
void |
setServiceBeans(String beans)
The service beans (the bean ids to lookup in the registry) which you want to export as REST service.
|
void |
setSkipFaultLogging(boolean skipFaultLogging)
This option controls whether the PhaseInterceptorChain skips logging the Fault that it catches.
|
void |
setSslContextParameters(org.apache.camel.support.jsse.SSLContextParameters sslContextParameters)
The Camel SSL setting reference.
|
void |
setThrowExceptionOnFailure(boolean throwExceptionOnFailure)
This option tells the CxfRsProducer to inspect return codes and will generate an Exception if the return code is
larger than 207.
|
protected void |
setupCommonFactoryProperties(org.apache.cxf.jaxrs.AbstractJAXRSFactoryBean factory) |
protected void |
setupJAXRSClientFactoryBean(org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean cfb,
String address) |
protected void |
setupJAXRSServerFactoryBean(org.apache.cxf.jaxrs.JAXRSServerFactoryBean sfb) |
protected void |
updateEndpointUri(String endpointUri) |
configureConsumer, configurePollingConsumer, configureProperties, createAsyncProducer, createEndpointUri, createExchange, createExchange, createPollingConsumer, doStart, equals, getCamelContext, getComponent, getEndpointKey, getEndpointUri, getExceptionHandler, getExchangePattern, getId, getPollingConsumerBlockTimeout, getPollingConsumerQueueSize, hashCode, isAutowiredEnabled, isBridgeErrorHandler, isLazyStartProducer, isPollingConsumerBlockWhenFull, isSingleton, isSynchronous, setAutowiredEnabled, setBridgeErrorHandler, setCamelContext, setComponent, setEndpointUri, setEndpointUriIfNotSpecified, setExceptionHandler, setExchangePattern, setLazyStartProducer, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerQueueSize, setProperties, setSynchronous, toString
build, doBuild, doFail, doLifecycleChange, doResume, doShutdown, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
public CxfRsEndpoint()
public CxfRsEndpoint(String endpointUri, org.apache.camel.Component component)
public boolean isLenientProperties()
isLenientProperties
in interface org.apache.camel.Endpoint
isLenientProperties
in class org.apache.camel.support.DefaultEndpoint
protected void updateEndpointUri(String endpointUri)
public void setHttpClientAPI(boolean clientAPI)
public boolean isHttpClientAPI()
public org.apache.camel.spi.HeaderFilterStrategy getHeaderFilterStrategy()
getHeaderFilterStrategy
in interface org.apache.camel.spi.HeaderFilterStrategyAware
public void setHeaderFilterStrategy(org.apache.camel.spi.HeaderFilterStrategy strategy)
setHeaderFilterStrategy
in interface org.apache.camel.spi.HeaderFilterStrategyAware
public org.apache.camel.Consumer createConsumer(org.apache.camel.Processor processor) throws Exception
createConsumer
in interface org.apache.camel.Endpoint
Exception
public org.apache.camel.Producer createProducer() throws Exception
createProducer
in interface org.apache.camel.Endpoint
Exception
public void setBinding(CxfRsBinding binding)
public CxfRsBinding getBinding()
public boolean isSkipFaultLogging()
public CxfRsConfigurer getChainedCxfRsEndpointConfigurer()
public void setSkipFaultLogging(boolean skipFaultLogging)
protected void setupJAXRSServerFactoryBean(org.apache.cxf.jaxrs.JAXRSServerFactoryBean sfb)
protected CxfRsConfigurer getNullSafeCxfRsEndpointConfigurer()
protected void setupJAXRSClientFactoryBean(org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean cfb, String address)
protected void setupCommonFactoryProperties(org.apache.cxf.jaxrs.AbstractJAXRSFactoryBean factory)
protected org.apache.cxf.jaxrs.JAXRSServerFactoryBean newJAXRSServerFactoryBean()
protected org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean newJAXRSClientFactoryBean()
public org.apache.cxf.jaxrs.JAXRSServerFactoryBean createJAXRSServerFactoryBean()
public org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean createJAXRSClientFactoryBean()
public org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean createJAXRSClientFactoryBean(String address)
public void addResourceClass(Class<?> resourceClass)
public void setResourceClasses(List<Class<?>> resourceClasses)
public void setResourceClasses(Class<?>... classes)
public List<?> getServiceBeans()
public void setServiceBeans(String beans)
public void setServiceBeans(List<?> beans)
public void setServiceBean(Object bean)
public void setAddress(String address)
public String getModelRef()
public void setModelRef(String ref)
public String getAddress()
public String getPublishedEndpointUrl()
public void setPublishedEndpointUrl(String publishedEndpointUrl)
public boolean isLoggingFeatureEnabled()
public void setLoggingFeatureEnabled(boolean loggingFeatureEnabled)
public int getLoggingSizeLimit()
public void setLoggingSizeLimit(int loggingSizeLimit)
public boolean isThrowExceptionOnFailure()
public void setThrowExceptionOnFailure(boolean throwExceptionOnFailure)
public void setMaxClientCacheSize(int maxClientCacheSize)
public int getMaxClientCacheSize()
public void setBus(org.apache.cxf.Bus bus)
public org.apache.cxf.Bus getBus()
public void setDefaultBus(boolean isSetDefaultBus)
public boolean isDefaultBus()
public boolean isIgnoreDeleteMethodMessageBody()
public void setIgnoreDeleteMethodMessageBody(boolean ignoreDeleteMethodMessageBody)
public BindingStyle getBindingStyle()
public List<?> getProviders()
public void setProviders(List<?> providers)
public void setProviders(String providers)
public void setProvider(Object provider)
public void setSchemaLocation(String schema)
public void setSchemaLocations(List<String> schemas)
public List<org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message>> getOutFaultInterceptors()
public List<org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message>> getInFaultInterceptors()
public List<org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message>> getInInterceptors()
public List<org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message>> getOutInterceptors()
public void setInInterceptors(List<org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message>> interceptors)
public void setInFaultInterceptors(List<org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message>> interceptors)
public void setOutInterceptors(List<org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message>> interceptors)
public void setOutFaultInterceptors(List<org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message>> interceptors)
public List<org.apache.cxf.feature.Feature> getFeatures()
public void setFeatures(List<org.apache.cxf.feature.Feature> features)
public void setBindingStyle(BindingStyle bindingStyle)
MessageContentsList
. It also also adds more flexibility and simplicity to the
response mapping. Only available for consumers.MessageContentsList
coming in from the CXF stack onto the IN message body. The
user is then responsible for processing it according to the contract defined by the JAX-RS method signature.public String getBeanId()
public void setBeanId(String beanId)
protected void doInit() throws Exception
doInit
in class org.apache.camel.support.DefaultEndpoint
Exception
protected void doStop() throws Exception
doStop
in class org.apache.camel.support.DefaultEndpoint
Exception
public long getContinuationTimeout()
public void setContinuationTimeout(long continuationTimeout)
public boolean isPerformInvocation()
public void setPerformInvocation(boolean performInvocation)
public boolean isPropagateContexts()
public void setPropagateContexts(boolean propagateContexts)
public org.apache.camel.support.jsse.SSLContextParameters getSslContextParameters()
public void setSslContextParameters(org.apache.camel.support.jsse.SSLContextParameters sslContextParameters)
public HostnameVerifier getHostnameVerifier()
public void setHostnameVerifier(HostnameVerifier hostnameVerifier)
public CxfRsConfigurer getCxfRsConfigurer()
public void setCxfRsConfigurer(CxfRsConfigurer configurer)
public org.apache.camel.http.base.cookie.CookieHandler getCookieHandler()
public void setCookieHandler(org.apache.camel.http.base.cookie.CookieHandler cookieHandler)
Apache Camel