org.apache.camel.component.cxf
Class CxfEndpoint

java.lang.Object
  extended by org.apache.camel.impl.ServiceSupport
      extended by org.apache.camel.impl.DefaultEndpoint
          extended by org.apache.camel.component.cxf.CxfEndpoint
All Implemented Interfaces:
CamelContextAware, Endpoint, IsSingleton, Service, ShutdownableService, HasId, HeaderFilterStrategyAware
Direct Known Subclasses:
CxfBlueprintEndpoint, CxfSpringEndpoint

public class CxfEndpoint
extends DefaultEndpoint
implements HeaderFilterStrategyAware, Service

Defines the CXF Endpoint. It contains a list of properties for CXF endpoint including DataFormat, CxfBinding, and HeaderFilterStrategy. The default DataFormat mode is DataFormat.POJO.


Field Summary
protected  org.apache.cxf.Bus bus
           
 
Constructor Summary
CxfEndpoint()
           
CxfEndpoint(String remaining)
           
CxfEndpoint(String remaining, CamelContext context)
           
CxfEndpoint(String remaining, CxfComponent cxfComponent)
           
 
Method Summary
protected  org.apache.cxf.frontend.ClientFactoryBean createClientFactoryBean()
          Create a client factory bean object without serviceClass interface.
protected  org.apache.cxf.frontend.ClientFactoryBean createClientFactoryBean(Class<?> cls)
          Create a client factory bean object.
 Consumer createConsumer(Processor processor)
          Creates a new Event Driven Consumer which consumes messages from the endpoint using the given processor
 Producer createProducer()
          Creates a new producer which is used send messages into the endpoint
protected  void doStart()
           
protected  void doStop()
           
 String getAddress()
           
 String getBindingId()
           
 org.apache.cxf.Bus getBus()
           
 CxfBinding getCxfBinding()
           
 DataFormat getDataFormat()
           
 String getDefaultOperationName()
           
 String getDefaultOperationNamespace()
           
 List<org.apache.cxf.feature.AbstractFeature> getFeatures()
           
 List<Handler> getHandlers()
           
 HeaderFilterStrategy getHeaderFilterStrategy()
          Gets the header filter strategy used
 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()
           
 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()
           
 QName getPortName()
           
 Map<String,Object> getProperties()
           
 String getPublishedEndpointUrl()
           
 List<String> getSchemaLocations()
           
 Class<?> getServiceClass()
           
 QName getServiceName()
           
 String getTransportId()
           
 Boolean getWrappedStyle()
           
 String getWsdlURL()
           
 boolean isInOut()
           
 boolean isLoggingFeatureEnabled()
           
 boolean isMtomEnabled()
           
 boolean isSetDefaultBus()
           
 boolean isSingleton()
          Whether this class supports being singleton or not.
protected  boolean isSkipPayloadMessagePartCheck()
           
 boolean isWrapped()
           
protected  String resolvePropertyPlaceholders(String str)
           
 void setAddress(String address)
           
 void setBindingId(String bindingId)
           
 void setBus(org.apache.cxf.Bus bus)
           
 void setCamelContext(CamelContext c)
          Sets the camel context.
 void setCxfBinding(CxfBinding cxfBinding)
           
 void setDataFormat(DataFormat format)
           
 void setDefaultOperationName(String name)
           
 void setDefaultOperationNamespace(String namespace)
           
 void setEndpointName(QName port)
           
 void setEndpointNameString(String port)
           
 void setFeatures(List<org.apache.cxf.feature.AbstractFeature> f)
           
 void setHandlers(List<Handler> h)
           
 void setHeaderFilterStrategy(HeaderFilterStrategy headerFilterStrategy)
          Sets the header filter strategy to use
 void setInFaultInterceptors(List<org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message>> interceptors)
           
 void setInInterceptors(List<org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message>> interceptors)
           
 void setInOut(boolean inOut)
           
 void setLoggingFeatureEnabled(boolean loggingFeatureEnabled)
           
 void setMtomEnabled(boolean mtomEnabled)
           
 void setOutFaultInterceptors(List<org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message>> interceptors)
           
 void setOutInterceptors(List<org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message>> interceptors)
           
 void setPortName(QName port)
           
 void setProperties(Map<String,Object> properties)
           
 void setPublishedEndpointUrl(String url)
           
 void setSchemaLocations(List<String> sc)
           
 void setServiceClass(Class<?> cls)
           
 void setServiceClass(Object instance)
           
 void setServiceClass(String type)
           
 void setServiceName(QName service)
           
 void setServiceNameString(String service)
           
 void setSetDefaultBus(boolean isSetDefaultBus)
           
protected  void setSkipPayloadMessagePartCheck(boolean skipPayloadMessagePartCheck)
           
 void setTransportId(String transportId)
           
protected  void setupClientFactoryBean(org.apache.cxf.frontend.ClientFactoryBean factoryBean, Class<?> cls)
           
protected  void setupHandlers(org.apache.cxf.frontend.ClientFactoryBean factoryBean, org.apache.cxf.endpoint.Client client)
           
protected  void setupServerFactoryBean(org.apache.cxf.frontend.ServerFactoryBean sfb, Class<?> cls)
          Populate server factory bean
 void setWrapped(boolean wrapped)
           
 void setWrappedStyle(Boolean wrapped)
           
 void setWsdlURL(String url)
           
protected  void updateEndpointUri(String endpointUri)
           
 
Methods inherited from class org.apache.camel.impl.DefaultEndpoint
configureProperties, createEndpointUri, createExchange, createExchange, createExchange, createPollingConsumer, equals, getCamelContext, getComponent, getEndpointKey, getEndpointUri, getExchangePattern, getExchangeType, getId, hashCode, isLenientProperties, isSynchronous, setEndpointUri, setEndpointUriIfNotSpecified, setExchangePattern, setSynchronous, toString
 
Methods inherited from class org.apache.camel.impl.ServiceSupport
addChildService, doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspended, isSuspending, removeChildService, resume, shutdown, start, start, stop, suspend
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.camel.Service
start, stop
 

Field Detail

bus

protected org.apache.cxf.Bus bus
Constructor Detail

CxfEndpoint

public CxfEndpoint(String remaining,
                   CxfComponent cxfComponent)

CxfEndpoint

public CxfEndpoint(String remaining,
                   CamelContext context)

CxfEndpoint

public CxfEndpoint(String remaining)

CxfEndpoint

public CxfEndpoint()
Method Detail

updateEndpointUri

protected void updateEndpointUri(String endpointUri)

createProducer

public Producer createProducer()
                        throws Exception
Description copied from interface: Endpoint
Creates a new producer which is used send messages into the endpoint

Specified by:
createProducer in interface Endpoint
Returns:
a newly created producer
Throws:
Exception - can be thrown

createConsumer

public Consumer createConsumer(Processor processor)
                        throws Exception
Description copied from interface: Endpoint
Creates a new Event Driven Consumer which consumes messages from the endpoint using the given processor

Specified by:
createConsumer in interface Endpoint
Parameters:
processor - the given processor
Returns:
a newly created consumer
Throws:
Exception - can be thrown

isSingleton

public boolean isSingleton()
Description copied from interface: IsSingleton
Whether this class supports being singleton or not.

Specified by:
isSingleton in interface IsSingleton
Returns:
true to be a single shared instance, false to create new instances.

setupServerFactoryBean

protected void setupServerFactoryBean(org.apache.cxf.frontend.ServerFactoryBean sfb,
                                      Class<?> cls)
Populate server factory bean


createClientFactoryBean

protected org.apache.cxf.frontend.ClientFactoryBean createClientFactoryBean(Class<?> cls)
                                                                     throws CamelException
Create a client factory bean object. Notice that the serviceClass must be an interface.

Throws:
CamelException

createClientFactoryBean

protected org.apache.cxf.frontend.ClientFactoryBean createClientFactoryBean()
Create a client factory bean object without serviceClass interface.


setupHandlers

protected void setupHandlers(org.apache.cxf.frontend.ClientFactoryBean factoryBean,
                             org.apache.cxf.endpoint.Client client)

setupClientFactoryBean

protected void setupClientFactoryBean(org.apache.cxf.frontend.ClientFactoryBean factoryBean,
                                      Class<?> cls)

resolvePropertyPlaceholders

protected String resolvePropertyPlaceholders(String str)

getDataFormat

public DataFormat getDataFormat()

setDataFormat

public void setDataFormat(DataFormat format)

getPublishedEndpointUrl

public String getPublishedEndpointUrl()

setPublishedEndpointUrl

public void setPublishedEndpointUrl(String url)

getWsdlURL

public String getWsdlURL()

setWsdlURL

public void setWsdlURL(String url)

getServiceClass

public Class<?> getServiceClass()

setServiceClass

public void setServiceClass(Class<?> cls)

setServiceClass

public void setServiceClass(Object instance)

setServiceClass

public void setServiceClass(String type)
                     throws ClassNotFoundException
Throws:
ClassNotFoundException

setServiceNameString

public void setServiceNameString(String service)

setServiceName

public void setServiceName(QName service)

getServiceName

public QName getServiceName()

getPortName

public QName getPortName()

setPortName

public void setPortName(QName port)

setEndpointNameString

public void setEndpointNameString(String port)

setEndpointName

public void setEndpointName(QName port)

getDefaultOperationName

public String getDefaultOperationName()

setDefaultOperationName

public void setDefaultOperationName(String name)

getDefaultOperationNamespace

public String getDefaultOperationNamespace()

setDefaultOperationNamespace

public void setDefaultOperationNamespace(String namespace)

isInOut

public boolean isInOut()

setInOut

public void setInOut(boolean inOut)

isWrapped

public boolean isWrapped()

setWrapped

public void setWrapped(boolean wrapped)

getWrappedStyle

public Boolean getWrappedStyle()

setWrappedStyle

public void setWrappedStyle(Boolean wrapped)

setCxfBinding

public void setCxfBinding(CxfBinding cxfBinding)

getCxfBinding

public CxfBinding getCxfBinding()

setHeaderFilterStrategy

public void setHeaderFilterStrategy(HeaderFilterStrategy headerFilterStrategy)
Description copied from interface: HeaderFilterStrategyAware
Sets the header filter strategy to use

Specified by:
setHeaderFilterStrategy in interface HeaderFilterStrategyAware
Parameters:
headerFilterStrategy - the strategy

getHeaderFilterStrategy

public HeaderFilterStrategy getHeaderFilterStrategy()
Description copied from interface: HeaderFilterStrategyAware
Gets the header filter strategy used

Specified by:
getHeaderFilterStrategy in interface HeaderFilterStrategyAware
Returns:
the strategy

setBus

public void setBus(org.apache.cxf.Bus bus)

getBus

public org.apache.cxf.Bus getBus()

setSetDefaultBus

public void setSetDefaultBus(boolean isSetDefaultBus)

isSetDefaultBus

public boolean isSetDefaultBus()

setLoggingFeatureEnabled

public void setLoggingFeatureEnabled(boolean loggingFeatureEnabled)

isLoggingFeatureEnabled

public boolean isLoggingFeatureEnabled()

isSkipPayloadMessagePartCheck

protected boolean isSkipPayloadMessagePartCheck()

setSkipPayloadMessagePartCheck

protected void setSkipPayloadMessagePartCheck(boolean skipPayloadMessagePartCheck)

getProperties

public Map<String,Object> getProperties()

setCamelContext

public void setCamelContext(CamelContext c)
Description copied from interface: Endpoint
Sets the camel context.

Specified by:
setCamelContext in interface CamelContextAware
Specified by:
setCamelContext in interface Endpoint
Overrides:
setCamelContext in class DefaultEndpoint
Parameters:
c - the camel context

setProperties

public void setProperties(Map<String,Object> properties)

doStart

protected void doStart()
                throws Exception
Overrides:
doStart in class DefaultEndpoint
Throws:
Exception

doStop

protected void doStop()
               throws Exception
Overrides:
doStop in class DefaultEndpoint
Throws:
Exception

setAddress

public void setAddress(String address)

getAddress

public String getAddress()

setMtomEnabled

public void setMtomEnabled(boolean mtomEnabled)

isMtomEnabled

public boolean isMtomEnabled()

getOutFaultInterceptors

public List<org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message>> getOutFaultInterceptors()

getInFaultInterceptors

public List<org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message>> getInFaultInterceptors()

getInInterceptors

public List<org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message>> getInInterceptors()

getOutInterceptors

public List<org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message>> getOutInterceptors()

setInInterceptors

public void setInInterceptors(List<org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message>> interceptors)

setInFaultInterceptors

public void setInFaultInterceptors(List<org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message>> interceptors)

setOutInterceptors

public void setOutInterceptors(List<org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message>> interceptors)

setOutFaultInterceptors

public void setOutFaultInterceptors(List<org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message>> interceptors)

setFeatures

public void setFeatures(List<org.apache.cxf.feature.AbstractFeature> f)

getFeatures

public List<org.apache.cxf.feature.AbstractFeature> getFeatures()

setHandlers

public void setHandlers(List<Handler> h)

getHandlers

public List<Handler> getHandlers()

setSchemaLocations

public void setSchemaLocations(List<String> sc)

getSchemaLocations

public List<String> getSchemaLocations()

getTransportId

public String getTransportId()

setTransportId

public void setTransportId(String transportId)

getBindingId

public String getBindingId()

setBindingId

public void setBindingId(String bindingId)


Apache CAMEL