org.apache.servicemix.cxfbc
Class CxfBcConsumer

java.lang.Object
  extended by org.apache.servicemix.common.endpoints.AbstractEndpoint
      extended by org.apache.servicemix.common.endpoints.SimpleEndpoint
          extended by org.apache.servicemix.common.endpoints.ConsumerEndpoint
              extended by org.apache.servicemix.cxfbc.CxfBcConsumer
All Implemented Interfaces:
Endpoint, CxfBcEndpointType, CxfBcEndpointWithInterceptor

public class CxfBcConsumer
extends ConsumerEndpoint
implements CxfBcEndpointWithInterceptor

Author:
gnodet

Nested Class Summary
protected  class CxfBcConsumer.JbiChainInitiationObserver
           
 class CxfBcConsumer.JbiInvokerInterceptor
           
protected  class CxfBcConsumer.JbiPostInvokerInterceptor
           
 
Field Summary
 
Fields inherited from class org.apache.servicemix.common.endpoints.AbstractEndpoint
definition, description, endpoint, interfaceName, logger, service, serviceUnit
 
Constructor Summary
CxfBcConsumer()
           
 
Method Summary
 void activate()
           
 void deactivate()
           
protected  org.apache.cxf.Bus getBus()
           
 java.lang.String getBusCfg()
           
 java.util.List<org.apache.cxf.feature.AbstractFeature> getFeatures()
           
 java.util.List<org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message>> getInFaultInterceptors()
          Returns the list of interceptors used to process fault messages being recieved by the endpoint.
 java.util.List<org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message>> getInInterceptors()
          Returns the list of interceptors used to process responses being recieved by the endpoint.
 java.lang.String getLocationURI()
           
 java.util.List<org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message>> getOutFaultInterceptors()
          Returns the list of interceptors used to process fault messages being sent to the provider.
 java.util.List<org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message>> getOutInterceptors()
          Returns the list of interceptors used to process requests being sent to the provider.
 java.util.Map<java.lang.String,java.lang.Object> getProperties()
           
 org.apache.cxf.Bus getProvidedBus()
           
 long getTimeout()
           
 org.springframework.core.io.Resource getWsdl()
           
 boolean isDelegateToJaas()
           
 boolean isMtomEnabled()
           
 boolean isSchemaValidationEnabled()
           
 boolean isSynchronous()
           
 boolean isUseJBIWrapper()
           
 boolean isUseSOAPEnvelope()
           
 boolean isX509()
           
 void process(javax.jbi.messaging.MessageExchange exchange)
           
 void setBusCfg(java.lang.String busCfg)
          Specifies the location of the CXF configuraiton file used to configure the CXF bus.
 void setDelegateToJaas(boolean delegateToJaas)
          Specifies if the endpoint delegate to JAASAuthenticationService to do the authentication.
 void setFeatures(java.util.List<org.apache.cxf.feature.AbstractFeature> features)
          Specifies the cxf features set for this endpoint
 void setInFaultInterceptors(java.util.List<org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message>> interceptors)
          Specifies a list of interceptors used to process faults recieved by the endpoint.
 void setInInterceptors(java.util.List<org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message>> interceptors)
          Specifies a list of interceptors used to process responses recieved by the endpoint.
 void setLocationURI(java.lang.String locationURI)
          Specifies the HTTP address to which requests are sent.
 void setMtomEnabled(boolean mtomEnabled)
          Specifies if the endpoint can support binnary attachments.
 void setOutFaultInterceptors(java.util.List<org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message>> interceptors)
          Specifies a list of interceptors used to process faults sent by the endpoint.
 void setOutInterceptors(java.util.List<org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message>> interceptors)
          Specifies a list of interceptors used to process requests sent by the endpoint.
 void setProperties(java.util.Map<java.lang.String,java.lang.Object> properties)
          Sets arbitrary properties that are added to the CXF context at the Endpoint level.
 void setProvidedBus(org.apache.cxf.Bus providedBus)
          Specifies a preconfigured CXF bus to use.
 void setSchemaValidationEnabled(boolean schemaValidationEnabled)
          Specifies if the endpoint use schemavalidation for the incoming/outgoing message.
 void setSynchronous(boolean synchronous)
          Specifies if the endpoint expects send messageExchange by sendSync
 void setTimeout(long timeout)
          Specifies the interval for which the endpoint will wait for a response, This is specified in seconds.
 void setUseJBIWrapper(boolean useJBIWrapper)
          Specifies if the endpoint expects messages to use the JBI wrapper for SOAP messages.
 void setUseSOAPEnvelope(boolean useSOAPEnvelope)
          Specifies if the endpoint expects soap messages when useJBIWrapper is false, if useJBIWrapper is true then ignore useSOAPEnvelope
 void setWsdl(org.springframework.core.io.Resource wsdl)
          Specifies the location of the WSDL defining the endpoint's interface.
 void setX509(boolean x509)
          Specifies if the endpoint use X.509 Certificate to do the authentication.
 void start()
           
 void stop()
           
 void validate()
           
 
Methods inherited from class org.apache.servicemix.common.endpoints.ConsumerEndpoint
configureExchangeTarget, getRole, getTargetEndpoint, getTargetInterface, getTargetOperation, getTargetService, getTargetUri, setTargetEndpoint, setTargetInterface, setTargetOperation, setTargetService, setTargetUri
 
Methods inherited from class org.apache.servicemix.common.endpoints.SimpleEndpoint
done, fail, getChannel, getContext, getExchangeFactory, send, sendSync
 
Methods inherited from class org.apache.servicemix.common.endpoints.AbstractEndpoint
getDefinition, getDescription, getEndpoint, getInterfaceName, getKey, getService, getServiceUnit, isExchangeOkay, prepareExchange, setDefinition, setDescription, setEndpoint, setInterfaceName, setService, setServiceUnit, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CxfBcConsumer

public CxfBcConsumer()
Method Detail

getWsdl

public org.springframework.core.io.Resource getWsdl()
Returns:
the wsdl

setWsdl

public void setWsdl(org.springframework.core.io.Resource wsdl)
Specifies the location of the WSDL defining the endpoint's interface.

Parameters:
wsdl - the location of the WSDL contract as a Resource object

getOutFaultInterceptors

public java.util.List<org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message>> getOutFaultInterceptors()
Returns the list of interceptors used to process fault messages being sent to the provider.

Specified by:
getOutFaultInterceptors in interface CxfBcEndpointWithInterceptor
Returns:
a list of Interceptor objects

getInFaultInterceptors

public java.util.List<org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message>> getInFaultInterceptors()
Returns the list of interceptors used to process fault messages being recieved by the endpoint.

Specified by:
getInFaultInterceptors in interface CxfBcEndpointWithInterceptor
Returns:
a list of Interceptor objects

getInInterceptors

public java.util.List<org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message>> getInInterceptors()
Returns the list of interceptors used to process responses being recieved by the endpoint.

Specified by:
getInInterceptors in interface CxfBcEndpointWithInterceptor
Returns:
a list of Interceptor objects

getOutInterceptors

public java.util.List<org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message>> getOutInterceptors()
Returns the list of interceptors used to process requests being sent to the provider.

Specified by:
getOutInterceptors in interface CxfBcEndpointWithInterceptor
Returns:
a list of Interceptor objects

setInInterceptors

public void setInInterceptors(java.util.List<org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message>> interceptors)
Specifies a list of interceptors used to process responses recieved by the endpoint.

Specified by:
setInInterceptors in interface CxfBcEndpointWithInterceptor
Parameters:
interceptors - a list of Interceptor objects

setInFaultInterceptors

public void setInFaultInterceptors(java.util.List<org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message>> interceptors)
Specifies a list of interceptors used to process faults recieved by the endpoint.

Specified by:
setInFaultInterceptors in interface CxfBcEndpointWithInterceptor
Parameters:
interceptors - a list of Interceptor objects

setOutInterceptors

public void setOutInterceptors(java.util.List<org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message>> interceptors)
Specifies a list of interceptors used to process requests sent by the endpoint.

Specified by:
setOutInterceptors in interface CxfBcEndpointWithInterceptor
Parameters:
interceptors - a list of Interceptor objects

setOutFaultInterceptors

public void setOutFaultInterceptors(java.util.List<org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message>> interceptors)
Specifies a list of interceptors used to process faults sent by the endpoint.

Specified by:
setOutFaultInterceptors in interface CxfBcEndpointWithInterceptor
Parameters:
interceptors - a list of Interceptor objects

process

public void process(javax.jbi.messaging.MessageExchange exchange)
             throws java.lang.Exception
Specified by:
process in interface Endpoint
Specified by:
process in class AbstractEndpoint
Throws:
java.lang.Exception

activate

public void activate()
              throws java.lang.Exception
Specified by:
activate in interface Endpoint
Overrides:
activate in class ConsumerEndpoint
Throws:
java.lang.Exception

start

public void start()
           throws java.lang.Exception
Specified by:
start in interface Endpoint
Overrides:
start in class SimpleEndpoint
Throws:
java.lang.Exception

stop

public void stop()
          throws java.lang.Exception
Specified by:
stop in interface Endpoint
Overrides:
stop in class SimpleEndpoint
Throws:
java.lang.Exception

deactivate

public void deactivate()
                throws java.lang.Exception
Specified by:
deactivate in interface Endpoint
Overrides:
deactivate in class ConsumerEndpoint
Throws:
java.lang.Exception

validate

public void validate()
              throws javax.jbi.management.DeploymentException
Specified by:
validate in interface Endpoint
Overrides:
validate in class ConsumerEndpoint
Throws:
javax.jbi.management.DeploymentException

getBus

protected org.apache.cxf.Bus getBus()

setLocationURI

public void setLocationURI(java.lang.String locationURI)
Specifies the HTTP address to which requests are sent. This value will overide any value specified in the WSDL.

Parameters:
locationURI - the URI as a string

getLocationURI

public java.lang.String getLocationURI()
Overrides:
getLocationURI in class ConsumerEndpoint

setBusCfg

public void setBusCfg(java.lang.String busCfg)
Specifies the location of the CXF configuraiton file used to configure the CXF bus. This allows you to access features like JMS runtime behavior and WS-RM.

Parameters:
busCfg - a string containing the relative path to the configuration file

getBusCfg

public java.lang.String getBusCfg()

setMtomEnabled

public void setMtomEnabled(boolean mtomEnabled)
Specifies if the endpoint can support binnary attachments.

Parameters:
mtomEnabled - a boolean

isMtomEnabled

public boolean isMtomEnabled()

setTimeout

public void setTimeout(long timeout)
Specifies the interval for which the endpoint will wait for a response, This is specified in seconds.

Parameters:
timeout - the number of second to wait for a response

getTimeout

public long getTimeout()

setUseJBIWrapper

public void setUseJBIWrapper(boolean useJBIWrapper)
Specifies if the endpoint expects messages to use the JBI wrapper for SOAP messages.

Parameters:
useJBIWrapper - a boolean

isUseJBIWrapper

public boolean isUseJBIWrapper()

setUseSOAPEnvelope

public void setUseSOAPEnvelope(boolean useSOAPEnvelope)
Specifies if the endpoint expects soap messages when useJBIWrapper is false, if useJBIWrapper is true then ignore useSOAPEnvelope


isUseSOAPEnvelope

public boolean isUseSOAPEnvelope()

setSynchronous

public void setSynchronous(boolean synchronous)
Specifies if the endpoint expects send messageExchange by sendSync

Parameters:
synchronous - a boolean

isSynchronous

public boolean isSynchronous()

setFeatures

public void setFeatures(java.util.List<org.apache.cxf.feature.AbstractFeature> features)
Specifies the cxf features set for this endpoint

Parameters:
features - a list of AbstractFeature objects

getFeatures

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

setX509

public void setX509(boolean x509)
Specifies if the endpoint use X.509 Certificate to do the authentication.

Parameters:
x509 - a boolean

isX509

public boolean isX509()

isSchemaValidationEnabled

public boolean isSchemaValidationEnabled()

setSchemaValidationEnabled

public void setSchemaValidationEnabled(boolean schemaValidationEnabled)
Specifies if the endpoint use schemavalidation for the incoming/outgoing message.

Parameters:
schemaValidationEnabled - a boolean

setProvidedBus

public void setProvidedBus(org.apache.cxf.Bus providedBus)
Specifies a preconfigured CXF bus to use.

Parameters:
providedBus -

getProvidedBus

public org.apache.cxf.Bus getProvidedBus()

setDelegateToJaas

public void setDelegateToJaas(boolean delegateToJaas)
Specifies if the endpoint delegate to JAASAuthenticationService to do the authentication.

Parameters:
delegateToJaas - a boolean

isDelegateToJaas

public boolean isDelegateToJaas()

setProperties

public void setProperties(java.util.Map<java.lang.String,java.lang.Object> properties)
Sets arbitrary properties that are added to the CXF context at the Endpoint level.

Parameters:
properties - the properties to add

getProperties

public java.util.Map<java.lang.String,java.lang.Object> getProperties()


Copyright © 2005-2011 FuseSource. All Rights Reserved.