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.HasCamelContext, 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.CamelContextAware
Processor for forwarding exchanges to a dynamic endpoint destination.
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected boolean
     
    protected boolean
     
    protected int
     
    protected org.apache.camel.CamelContext
     
    protected org.apache.camel.spi.SendDynamicAware
     
    protected final org.apache.camel.Expression
     
    protected String
     
    protected boolean
     
    protected org.apache.camel.ExchangePattern
     
    protected org.apache.camel.spi.ProducerCache
     
    protected String
     
    protected String
     
    protected final String
     

    Fields inherited from class org.apache.camel.support.service.BaseService

    BUILT, FAILED, INITIALIZED, INITIALIZING, lock, NEW, SHUTDOWN, SHUTTING_DOWN, STARTED, STARTING, status, STOPPED, STOPPING, SUSPENDED, SUSPENDING
  • Constructor Summary

    Constructors
    Constructor
    Description
    SendDynamicProcessor(String uri, org.apache.camel.Expression expression)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected org.apache.camel.Exchange
    configureExchange(org.apache.camel.Exchange exchange, org.apache.camel.ExchangePattern pattern, org.apache.camel.Endpoint endpoint)
     
    protected void
     
    protected void
     
    protected void
     
    int
     
    org.apache.camel.CamelContext
     
    org.apache.camel.spi.SendDynamicAware
     
    org.apache.camel.spi.EndpointUtilizationStatistics
     
    protected static org.apache.camel.Endpoint
    getExistingEndpoint(org.apache.camel.Exchange exchange, Object recipient)
     
    org.apache.camel.Expression
     
     
    org.apache.camel.ExchangePattern
     
     
     
    boolean
     
    boolean
     
    boolean
     
    protected static Object
    prepareRecipient(org.apache.camel.Exchange exchange, Object recipient)
     
    boolean
    process(org.apache.camel.Exchange exchange, org.apache.camel.AsyncCallback callback)
     
    protected static org.apache.camel.Endpoint
    resolveEndpoint(org.apache.camel.Exchange exchange, Object recipient, boolean prototype)
     
    protected static String
    resolveScheme(org.apache.camel.Exchange exchange, String uri)
     
    protected static String
    resolveUri(org.apache.camel.Exchange exchange, Object recipient)
     
    void
    setAllowOptimisedComponents(boolean allowOptimisedComponents)
     
    void
    setAutoStartupComponents(boolean autoStartupComponents)
     
    void
    setCacheSize(int cacheSize)
     
    void
    setCamelContext(org.apache.camel.CamelContext camelContext)
     
    void
     
    void
    setIgnoreInvalidEndpoint(boolean ignoreInvalidEndpoint)
     
    void
    setPattern(org.apache.camel.ExchangePattern pattern)
     
    void
    setRouteId(String routeId)
     
     

    Methods inherited from class org.apache.camel.support.AsyncProcessorSupport

    process, processAsync

    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

    Methods inherited from interface org.apache.camel.spi.IdAware

    setGeneratedId

    Methods inherited from interface org.apache.camel.Service

    build, close, init, start, stop

    Methods inherited from interface org.apache.camel.ShutdownableService

    shutdown

    Methods inherited from interface org.apache.camel.StatefulService

    getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspending

    Methods inherited from interface org.apache.camel.SuspendableService

    isSuspended, resume, suspend
  • Field Details

    • 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 Details

    • SendDynamicProcessor

      public SendDynamicProcessor(String uri, org.apache.camel.Expression expression)
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getId

      public String getId()
      Specified by:
      getId in interface org.apache.camel.spi.HasId
    • setId

      public void setId(String id)
      Specified by:
      setId in interface org.apache.camel.spi.IdAware
    • getRouteId

      public String getRouteId()
      Specified by:
      getRouteId in interface org.apache.camel.spi.RouteIdAware
    • setRouteId

      public void setRouteId(String routeId)
      Specified by:
      setRouteId in interface org.apache.camel.spi.RouteIdAware
    • process

      public boolean process(org.apache.camel.Exchange exchange, org.apache.camel.AsyncCallback callback)
      Specified by:
      process in interface org.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:
      doInit in class org.apache.camel.support.service.BaseService
      Throws:
      Exception
    • doStart

      protected void doStart() throws Exception
      Overrides:
      doStart in class org.apache.camel.support.service.BaseService
      Throws:
      Exception
    • doStop

      protected void doStop() throws Exception
      Overrides:
      doStop in class org.apache.camel.support.service.BaseService
      Throws:
      Exception
    • getEndpointUtilizationStatistics

      public org.apache.camel.spi.EndpointUtilizationStatistics getEndpointUtilizationStatistics()
    • getCamelContext

      public org.apache.camel.CamelContext getCamelContext()
      Specified by:
      getCamelContext in interface org.apache.camel.spi.HasCamelContext
    • setCamelContext

      public void setCamelContext(org.apache.camel.CamelContext camelContext)
      Specified by:
      setCamelContext in interface org.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)