org.apache.servicemix.camel
Class CamelJbiComponent

java.lang.Object
  extended by org.apache.servicemix.common.AsyncBaseLifeCycle
      extended by org.apache.servicemix.common.DefaultComponent
          extended by org.apache.servicemix.camel.CamelJbiComponent
All Implemented Interfaces:
javax.jbi.component.Component, javax.jbi.component.ComponentLifeCycle, CamelComponent, ServiceMixComponent
Direct Known Subclasses:
OsgiCamelJbiComponent

public class CamelJbiComponent
extends DefaultComponent
implements CamelComponent

Deploys the camel endpoints within JBI

Version:
$Revision: 426415 $

Field Summary
protected  CamelSpringDeployer deployer
           
 
Fields inherited from class org.apache.servicemix.common.DefaultComponent
lifeCycle, logger, registry, serviceUnit, serviceUnitManager
 
Fields inherited from class org.apache.servicemix.common.AsyncBaseLifeCycle
channel, component, consumerExecutor, container, context, correlationId, currentState, executorFactory, INITIALIZED, knownExchanges, mbeanName, poller, polling, providerExecutor, 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(java.lang.String uriString, JbiComponent jbiComponent)
           
 BaseServiceUnitManager createServiceUnitManager()
           
 void deactivateJbiEndpoint(CamelProviderEndpoint jbiEndpoint)
           
protected  java.util.List<CamelProviderEndpoint> getConfiguredEndpoints()
           
protected  java.lang.Class[] getEndpointClasses()
           
protected  java.lang.String[] getEPRProtocols()
           
 JbiComponent getJbiComponent(java.lang.String suName)
           
protected  Endpoint getResolvedEPR(javax.jbi.servicedesc.ServiceEndpoint ep)
           
 boolean isEndpointExposedOnNmr(org.apache.camel.Endpoint endpoint)
          Should we expose the Camel JBI onto the NMR.
 void removeJbiComponent(java.lang.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, isKnownEndpoint, removeEndpoint, resolveEndpointReference, validateEndpoint
 
Methods inherited from class org.apache.servicemix.common.AsyncBaseLifeCycle
createExecutorFactory, createExtensionMBeanName, exceptionShouldRollbackTx, findExecutorFactory, getContainer, getContext, getCurrentState, getExecutor, getExecutorFactory, getExtensionMBean, getExtensionMBeanName, getKnownExchanges, getSmx3Container, handleExchange, init, isInitialized, isShutDown, isStarted, isStopped, isUnknown, onMessageExchange, pollDeliveryChannel, prepareExchange, prepareShutdown, prepareShutdown, processExchange, processExchangeInTx, setComponent, setCurrentState, setExecutor, setExecutorFactory, 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.camel.CamelComponent
addEndpoint, getServiceUnit, removeEndpoint
 
Methods inherited from interface org.apache.servicemix.common.ServiceMixComponent
getComponentContext, getComponentName, getContainer, getEPRElementName, getExecutor, getLogger, getRegistry, getSmx3Container, handleExchange, prepareExchange, prepareShutdown
 
Methods inherited from interface javax.jbi.component.Component
getLifeCycle, getServiceDescription, getServiceUnitManager, isExchangeWithConsumerOkay, isExchangeWithProviderOkay, resolveEndpointReference
 

Field Detail

deployer

protected CamelSpringDeployer deployer
Constructor Detail

CamelJbiComponent

public CamelJbiComponent()
Method Detail

createServiceUnitManager

public BaseServiceUnitManager createServiceUnitManager()
Overrides:
createServiceUnitManager in class DefaultComponent

getConfiguredEndpoints

protected java.util.List<CamelProviderEndpoint> getConfiguredEndpoints()
Overrides:
getConfiguredEndpoints in class DefaultComponent
Returns:
List of endpoints
See Also:
DefaultComponent.getConfiguredEndpoints()

getEndpointClasses

protected java.lang.Class[] getEndpointClasses()
Overrides:
getEndpointClasses in class DefaultComponent
Returns:
Class[]
See Also:
DefaultComponent.getEndpointClasses()

getEPRProtocols

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

getResolvedEPR

protected Endpoint getResolvedEPR(javax.jbi.servicedesc.ServiceEndpoint ep)
                           throws java.lang.Exception
Overrides:
getResolvedEPR in class AsyncBaseLifeCycle
Throws:
java.lang.Exception

createEndpoint

public CamelProviderEndpoint createEndpoint(java.lang.String uriString,
                                            JbiComponent jbiComponent)
                                     throws java.net.URISyntaxException
Throws:
java.net.URISyntaxException

addJbiComponent

public void addJbiComponent(JbiComponent jbiComponent)
Specified by:
addJbiComponent in interface CamelComponent

removeJbiComponent

public void removeJbiComponent(java.lang.String suName)

getJbiComponent

public JbiComponent getJbiComponent(java.lang.String suName)

activateJbiEndpoint

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

Specified by:
activateJbiEndpoint in interface CamelComponent
Throws:
java.lang.Exception

deactivateJbiEndpoint

public void deactivateJbiEndpoint(CamelProviderEndpoint jbiEndpoint)
                           throws java.lang.Exception
Specified by:
deactivateJbiEndpoint in interface CamelComponent
Throws:
java.lang.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-2012 FuseSource. All Rights Reserved.