org.apache.servicemix.camel
Class CamelJbiComponent

java.lang.Object
  extended by org.apache.servicemix.common.AsyncBaseLifeCycle
      extended by org.apache.servicemix.common.BaseLifeCycle
          extended by org.apache.servicemix.common.DefaultComponent
              extended by org.apache.servicemix.camel.CamelJbiComponent
All Implemented Interfaces:
Component, ComponentLifeCycle, ServiceMixComponent, MessageExchangeListener

public class CamelJbiComponent
extends DefaultComponent

Deploys the camel endpoints within JBI

Version:
$Revision: 426415 $

Field Summary
protected  CamelSpringDeployer deployer
           
 
Fields inherited from class org.apache.servicemix.common.DefaultComponent
logger, registry, serviceUnit, serviceUnitManager
 
Fields inherited from class org.apache.servicemix.common.AsyncBaseLifeCycle
channel, component, context, correlationId, currentState, executor, executorFactory, INITIALIZED, mbeanName, poller, polling, processors, running, transactionManager, workManagerCreated
 
Constructor Summary
CamelJbiComponent()
           
 
Method Summary
 void activateJbiEndpoint(CamelProviderEndpoint jbiEndpoint)
          Activating a JBI endpoint created by a camel consumer.
 void addJbiComponent(JbiComponent jbiComponent)
           
 CamelProviderEndpoint createEndpoint(String uriString, JbiComponent jbiComponent)
           
 BaseServiceUnitManager createServiceUnitManager()
           
 void deactivateJbiEndpoint(CamelProviderEndpoint jbiEndpoint)
           
protected  List<CamelProviderEndpoint> getConfiguredEndpoints()
           
protected  Class[] getEndpointClasses()
           
protected  String[] getEPRProtocols()
           
 JbiComponent getJbiComponent(String suName)
           
protected  Endpoint getResolvedEPR(ServiceEndpoint ep)
           
 boolean isEndpointExposedOnNmr(org.apache.camel.Endpoint endpoint)
          Should we expose the Camel JBI onto the NMR.
 void removeJbiComponent(String suName)
           
 
Methods inherited from class org.apache.servicemix.common.DefaultComponent
addEndpoint, asList, createRegistry, doInit, doShutDown, doStart, doStop, getComponentContext, getComponentName, getEPRElementName, getEPRServiceName, getLifeCycle, getLogger, getRegistry, getServiceDescription, getServiceUnit, getServiceUnitManager, isExchangeWithConsumerOkay, isExchangeWithProviderOkay, removeEndpoint, resolveEndpointReference, validateEndpoint
 
Methods inherited from class org.apache.servicemix.common.BaseLifeCycle
onMessageExchange
 
Methods inherited from class org.apache.servicemix.common.AsyncBaseLifeCycle
createExecutorFactory, createExtensionMBeanName, exceptionShouldRollbackTx, findExecutorFactory, getContext, getCurrentState, getExecutor, getExtensionMBean, getExtensionMBeanName, init, isInitialized, isShutDown, isStarted, isStopped, isUnknown, pollDeliveryChannel, prepareConsumerExchange, processExchange, processExchangeInTx, sendConsumerExchange, sendConsumerExchange, setComponent, setCurrentState, shutDown, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.servicemix.common.ServiceMixComponent
getExecutor, prepareConsumerExchange, sendConsumerExchange
 

Field Detail

deployer

protected CamelSpringDeployer deployer
Constructor Detail

CamelJbiComponent

public CamelJbiComponent()
Method Detail

createServiceUnitManager

public BaseServiceUnitManager createServiceUnitManager()
Overrides:
createServiceUnitManager in class DefaultComponent

getConfiguredEndpoints

protected List<CamelProviderEndpoint> getConfiguredEndpoints()
Specified by:
getConfiguredEndpoints in class DefaultComponent
Returns:
List of endpoints
See Also:
DefaultComponent.getConfiguredEndpoints()

getEndpointClasses

protected Class[] getEndpointClasses()
Specified by:
getEndpointClasses in class DefaultComponent
Returns:
Class[]
See Also:
DefaultComponent.getEndpointClasses()

getEPRProtocols

protected String[] getEPRProtocols()
Overrides:
getEPRProtocols in class DefaultComponent

getResolvedEPR

protected Endpoint getResolvedEPR(ServiceEndpoint ep)
                           throws Exception
Overrides:
getResolvedEPR in class AsyncBaseLifeCycle
Throws:
Exception

createEndpoint

public CamelProviderEndpoint createEndpoint(String uriString,
                                            JbiComponent jbiComponent)
                                     throws URISyntaxException
Throws:
URISyntaxException

addJbiComponent

public void addJbiComponent(JbiComponent jbiComponent)

removeJbiComponent

public void removeJbiComponent(String suName)

getJbiComponent

public JbiComponent getJbiComponent(String suName)

activateJbiEndpoint

public void activateJbiEndpoint(CamelProviderEndpoint jbiEndpoint)
                         throws Exception
Activating a JBI endpoint created by a camel consumer.

Throws:
Exception

deactivateJbiEndpoint

public void deactivateJbiEndpoint(CamelProviderEndpoint jbiEndpoint)
                           throws Exception
Throws:
Exception

isEndpointExposedOnNmr

public boolean isEndpointExposedOnNmr(org.apache.camel.Endpoint endpoint)
Should we expose the Camel JBI onto the NMR.

We may wish to add some policy stuff etc.

Parameters:
endpoint - the camel endpoint
Returns:
true if the endpoint should be exposed in the NMR


Copyright © 2005-2010 Apache Software Foundation. All Rights Reserved.