Class DefaultChannel

java.lang.Object
org.apache.camel.support.service.BaseService
org.apache.camel.support.service.ServiceSupport
org.apache.camel.support.AsyncProcessorSupport
org.apache.camel.support.processor.DelegateAsyncProcessor
org.apache.camel.impl.engine.CamelInternalProcessor
org.apache.camel.impl.engine.DefaultChannel
All Implemented Interfaces:
AutoCloseable, org.apache.camel.AsyncProcessor, org.apache.camel.Channel, org.apache.camel.DelegateProcessor, org.apache.camel.Navigate<org.apache.camel.Processor>, org.apache.camel.Processor, org.apache.camel.Service, org.apache.camel.ShutdownableService, org.apache.camel.spi.InternalProcessor, org.apache.camel.StatefulService, org.apache.camel.SuspendableService

public class DefaultChannel extends CamelInternalProcessor implements org.apache.camel.Channel
DefaultChannel is the default Channel.

The current implementation is just a composite containing the interceptors and error handler that beforehand was added to the route graph directly.
With this Channel we can in the future implement better strategies for routing the Exchange in the route graph, as we have a Channel between each and every node in the graph.

  • Constructor Details

    • DefaultChannel

      public DefaultChannel(org.apache.camel.CamelContext camelContext)
  • Method Details

    • getOutput

      public org.apache.camel.Processor getOutput()
      Specified by:
      getOutput in interface org.apache.camel.Channel
    • hasNext

      public boolean hasNext()
      Specified by:
      hasNext in interface org.apache.camel.Navigate<org.apache.camel.Processor>
      Overrides:
      hasNext in class org.apache.camel.support.processor.DelegateAsyncProcessor
    • next

      public List<org.apache.camel.Processor> next()
      Specified by:
      next in interface org.apache.camel.Navigate<org.apache.camel.Processor>
      Overrides:
      next in class org.apache.camel.support.processor.DelegateAsyncProcessor
    • setOutput

      public void setOutput(org.apache.camel.Processor output)
    • getNextProcessor

      public org.apache.camel.Processor getNextProcessor()
      Specified by:
      getNextProcessor in interface org.apache.camel.Channel
    • setErrorHandler

      public void setErrorHandler(org.apache.camel.Processor errorHandler)
      Specified by:
      setErrorHandler in interface org.apache.camel.Channel
    • getErrorHandler

      public org.apache.camel.Processor getErrorHandler()
      Specified by:
      getErrorHandler in interface org.apache.camel.Channel
    • getRoute

      public org.apache.camel.Route getRoute()
      Specified by:
      getRoute in interface org.apache.camel.Channel
    • doStart

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

      protected void doStop() throws Exception
      Overrides:
      doStop in class org.apache.camel.support.processor.DelegateAsyncProcessor
      Throws:
      Exception
    • doShutdown

      protected void doShutdown() throws Exception
      Overrides:
      doShutdown in class CamelInternalProcessor
      Throws:
      Exception
    • initChannel

      public void initChannel(org.apache.camel.Route route, org.apache.camel.NamedNode definition, org.apache.camel.NamedNode childDefinition, List<org.apache.camel.spi.InterceptStrategy> interceptors, org.apache.camel.Processor nextProcessor, org.apache.camel.NamedRoute routeDefinition, boolean first) throws Exception
      Specified by:
      initChannel in interface org.apache.camel.Channel
      Throws:
      Exception
    • postInitChannel

      public void postInitChannel() throws Exception
      Specified by:
      postInitChannel in interface org.apache.camel.Channel
      Throws:
      Exception
    • toString

      public String toString()
      Overrides:
      toString in class CamelInternalProcessor