Package org.apache.camel.processor
Class SendDynamicProcessor
- java.lang.Object
-
- org.apache.camel.support.service.BaseService
-
- org.apache.camel.support.service.ServiceSupport
-
- org.apache.camel.support.AsyncProcessorSupport
-
- org.apache.camel.processor.SendDynamicProcessor
-
- All Implemented Interfaces:
AutoCloseable,org.apache.camel.AsyncProcessor,org.apache.camel.CamelContextAware,org.apache.camel.Processor,org.apache.camel.Service,org.apache.camel.ShutdownableService,org.apache.camel.spi.HasId,org.apache.camel.spi.IdAware,org.apache.camel.spi.RouteIdAware,org.apache.camel.StatefulService,org.apache.camel.SuspendableService
public class SendDynamicProcessor extends org.apache.camel.support.AsyncProcessorSupport implements org.apache.camel.spi.IdAware, org.apache.camel.spi.RouteIdAware, org.apache.camel.CamelContextAwareProcessor for forwarding exchanges to a dynamic endpoint destination.- See Also:
SendProcessor
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanallowOptimisedComponentsprotected booleanautoStartupComponentsprotected intcacheSizeprotected org.apache.camel.CamelContextcamelContextprotected org.apache.camel.spi.SendDynamicAwaredynamicAwareprotected org.apache.camel.Expressionexpressionprotected Stringidprotected booleanignoreInvalidEndpointprotected org.apache.camel.ExchangePatternpatternprotected org.apache.camel.spi.ProducerCacheproducerCacheprotected StringrouteIdprotected Stringschemeprotected Stringuri
-
Constructor Summary
Constructors Constructor Description SendDynamicProcessor(String uri, org.apache.camel.Expression expression)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.apache.camel.ExchangeconfigureExchange(org.apache.camel.Exchange exchange, org.apache.camel.ExchangePattern pattern, org.apache.camel.Endpoint endpoint)protected voiddoInit()protected voiddoStart()protected voiddoStop()intgetCacheSize()org.apache.camel.CamelContextgetCamelContext()org.apache.camel.spi.SendDynamicAwaregetDynamicAware()org.apache.camel.spi.EndpointUtilizationStatisticsgetEndpointUtilizationStatistics()protected static org.apache.camel.EndpointgetExistingEndpoint(org.apache.camel.Exchange exchange, Object recipient)org.apache.camel.ExpressiongetExpression()StringgetId()org.apache.camel.ExchangePatterngetPattern()StringgetRouteId()StringgetUri()booleanisAllowOptimisedComponents()booleanisAutoStartupComponents()booleanisIgnoreInvalidEndpoint()protected static ObjectprepareRecipient(org.apache.camel.Exchange exchange, Object recipient)booleanprocess(org.apache.camel.Exchange exchange, org.apache.camel.AsyncCallback callback)protected static org.apache.camel.EndpointresolveEndpoint(org.apache.camel.Exchange exchange, Object recipient, boolean prototype)protected static StringresolveScheme(org.apache.camel.Exchange exchange, String uri)protected static StringresolveUri(org.apache.camel.Exchange exchange, Object recipient)voidsetAllowOptimisedComponents(boolean allowOptimisedComponents)voidsetAutoStartupComponents(boolean autoStartupComponents)voidsetCacheSize(int cacheSize)voidsetCamelContext(org.apache.camel.CamelContext camelContext)voidsetId(String id)voidsetIgnoreInvalidEndpoint(boolean ignoreInvalidEndpoint)voidsetPattern(org.apache.camel.ExchangePattern pattern)voidsetRouteId(String routeId)StringtoString()-
Methods inherited from class org.apache.camel.support.service.BaseService
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
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
dynamicAware
protected org.apache.camel.spi.SendDynamicAware dynamicAware
-
scheme
protected volatile String scheme
-
camelContext
protected org.apache.camel.CamelContext camelContext
-
uri
protected final String uri
-
expression
protected final org.apache.camel.Expression expression
-
pattern
protected org.apache.camel.ExchangePattern pattern
-
producerCache
protected org.apache.camel.spi.ProducerCache producerCache
-
id
protected String id
-
routeId
protected String routeId
-
ignoreInvalidEndpoint
protected boolean ignoreInvalidEndpoint
-
cacheSize
protected int cacheSize
-
allowOptimisedComponents
protected boolean allowOptimisedComponents
-
autoStartupComponents
protected boolean autoStartupComponents
-
-
Constructor Detail
-
SendDynamicProcessor
public SendDynamicProcessor(String uri, org.apache.camel.Expression expression)
-
-
Method Detail
-
getId
public String getId()
- Specified by:
getIdin interfaceorg.apache.camel.spi.HasId
-
setId
public void setId(String id)
- Specified by:
setIdin interfaceorg.apache.camel.spi.IdAware
-
getRouteId
public String getRouteId()
- Specified by:
getRouteIdin interfaceorg.apache.camel.spi.RouteIdAware
-
setRouteId
public void setRouteId(String routeId)
- Specified by:
setRouteIdin interfaceorg.apache.camel.spi.RouteIdAware
-
process
public boolean process(org.apache.camel.Exchange exchange, org.apache.camel.AsyncCallback callback)- Specified by:
processin interfaceorg.apache.camel.AsyncProcessor
-
resolveUri
protected static String resolveUri(org.apache.camel.Exchange exchange, Object recipient) throws org.apache.camel.NoTypeConversionAvailableException
- Throws:
org.apache.camel.NoTypeConversionAvailableException
-
resolveScheme
protected static String resolveScheme(org.apache.camel.Exchange exchange, String uri)
-
prepareRecipient
protected static Object prepareRecipient(org.apache.camel.Exchange exchange, Object recipient) throws org.apache.camel.NoTypeConversionAvailableException
- Throws:
org.apache.camel.NoTypeConversionAvailableException
-
getExistingEndpoint
protected static org.apache.camel.Endpoint getExistingEndpoint(org.apache.camel.Exchange exchange, Object recipient)
-
resolveEndpoint
protected static org.apache.camel.Endpoint resolveEndpoint(org.apache.camel.Exchange exchange, Object recipient, boolean prototype)
-
configureExchange
protected org.apache.camel.Exchange configureExchange(org.apache.camel.Exchange exchange, org.apache.camel.ExchangePattern pattern, org.apache.camel.Endpoint endpoint)
-
doInit
protected void doInit() throws Exception- Overrides:
doInitin classorg.apache.camel.support.service.BaseService- Throws:
Exception
-
doStart
protected void doStart() throws Exception- Overrides:
doStartin classorg.apache.camel.support.AsyncProcessorSupport- Throws:
Exception
-
doStop
protected void doStop() throws Exception- Overrides:
doStopin classorg.apache.camel.support.AsyncProcessorSupport- Throws:
Exception
-
getEndpointUtilizationStatistics
public org.apache.camel.spi.EndpointUtilizationStatistics getEndpointUtilizationStatistics()
-
getCamelContext
public org.apache.camel.CamelContext getCamelContext()
- Specified by:
getCamelContextin interfaceorg.apache.camel.CamelContextAware
-
setCamelContext
public void setCamelContext(org.apache.camel.CamelContext camelContext)
- Specified by:
setCamelContextin interfaceorg.apache.camel.CamelContextAware
-
getDynamicAware
public org.apache.camel.spi.SendDynamicAware getDynamicAware()
-
getUri
public String getUri()
-
getExpression
public org.apache.camel.Expression getExpression()
-
getPattern
public org.apache.camel.ExchangePattern getPattern()
-
setPattern
public void setPattern(org.apache.camel.ExchangePattern pattern)
-
isIgnoreInvalidEndpoint
public boolean isIgnoreInvalidEndpoint()
-
setIgnoreInvalidEndpoint
public void setIgnoreInvalidEndpoint(boolean ignoreInvalidEndpoint)
-
getCacheSize
public int getCacheSize()
-
setCacheSize
public void setCacheSize(int cacheSize)
-
isAllowOptimisedComponents
public boolean isAllowOptimisedComponents()
-
setAllowOptimisedComponents
public void setAllowOptimisedComponents(boolean allowOptimisedComponents)
-
isAutoStartupComponents
public boolean isAutoStartupComponents()
-
setAutoStartupComponents
public void setAutoStartupComponents(boolean autoStartupComponents)
-
-