public class DefaultChannel extends CamelInternalProcessor implements ModelChannel
Channel
.
The current implementation is just a composite containing the interceptors and error handler
that beforehand was added to the route graph directly.
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.CamelInternalProcessor.BacklogDebuggerAdvice, CamelInternalProcessor.BacklogTracerAdvice, CamelInternalProcessor.ChildUnitOfWorkProcessorAdvice, CamelInternalProcessor.DelayerAdvice, CamelInternalProcessor.MessageHistoryAdvice, CamelInternalProcessor.RouteInflightRepositoryAdvice, CamelInternalProcessor.RouteLifecycleAdvice, CamelInternalProcessor.RoutePolicyAdvice, CamelInternalProcessor.StreamCachingAdvice, CamelInternalProcessor.SubUnitOfWorkProcessorAdvice, CamelInternalProcessor.UnitOfWorkProcessorAdvice
Constructor and Description |
---|
DefaultChannel() |
Modifier and Type | Method and Description |
---|---|
void |
addInterceptStrategies(List<org.apache.camel.spi.InterceptStrategy> strategies) |
void |
addInterceptStrategy(org.apache.camel.spi.InterceptStrategy strategy) |
protected void |
doShutdown() |
protected void |
doStart() |
protected void |
doStop() |
org.apache.camel.Processor |
getErrorHandler() |
List<org.apache.camel.spi.InterceptStrategy> |
getInterceptStrategies() |
org.apache.camel.Processor |
getNextProcessor() |
org.apache.camel.Processor |
getOutput() |
ProcessorDefinition<?> |
getProcessorDefinition()
Gets the definition of the next processor
|
org.apache.camel.spi.RouteContext |
getRouteContext() |
boolean |
hasInterceptorStrategy(Class<?> type) |
boolean |
hasNext() |
void |
initChannel(ProcessorDefinition<?> outputDefinition,
org.apache.camel.spi.RouteContext routeContext)
Initializes the channel.
|
List<org.apache.camel.Processor> |
next() |
void |
postInitChannel(ProcessorDefinition<?> outputDefinition,
org.apache.camel.spi.RouteContext routeContext)
Post initializes the channel.
|
void |
setChildDefinition(ProcessorDefinition<?> childDefinition)
If the initialized output definition contained outputs (children) then we need to
set the child so we can leverage fine grained tracing
|
void |
setErrorHandler(org.apache.camel.Processor errorHandler) |
void |
setNextProcessor(org.apache.camel.Processor next) |
void |
setOutput(org.apache.camel.Processor output) |
String |
toString() |
addAdvice, continueProcessing, getAdvice, process
getProcessor, setProcessor, setProcessor
doInit, doResume, doSuspend, getStatus, init, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
public DefaultChannel()
public void setNextProcessor(org.apache.camel.Processor next)
setNextProcessor
in interface org.apache.camel.Channel
public org.apache.camel.Processor getOutput()
getOutput
in interface org.apache.camel.Channel
public boolean hasNext()
hasNext
in interface org.apache.camel.Navigate<org.apache.camel.Processor>
hasNext
in class org.apache.camel.support.processor.DelegateAsyncProcessor
public List<org.apache.camel.Processor> next()
next
in interface org.apache.camel.Navigate<org.apache.camel.Processor>
next
in class org.apache.camel.support.processor.DelegateAsyncProcessor
public void setOutput(org.apache.camel.Processor output)
setOutput
in interface org.apache.camel.Channel
public org.apache.camel.Processor getNextProcessor()
getNextProcessor
in interface org.apache.camel.Channel
public boolean hasInterceptorStrategy(Class<?> type)
public void setErrorHandler(org.apache.camel.Processor errorHandler)
setErrorHandler
in interface org.apache.camel.Channel
public org.apache.camel.Processor getErrorHandler()
getErrorHandler
in interface org.apache.camel.Channel
public void addInterceptStrategy(org.apache.camel.spi.InterceptStrategy strategy)
addInterceptStrategy
in interface org.apache.camel.Channel
public void addInterceptStrategies(List<org.apache.camel.spi.InterceptStrategy> strategies)
addInterceptStrategies
in interface org.apache.camel.Channel
public List<org.apache.camel.spi.InterceptStrategy> getInterceptStrategies()
getInterceptStrategies
in interface org.apache.camel.Channel
public ProcessorDefinition<?> getProcessorDefinition()
ModelChannel
getProcessorDefinition
in interface ModelChannel
public void setChildDefinition(ProcessorDefinition<?> childDefinition)
ModelChannel
setChildDefinition
in interface ModelChannel
childDefinition
- the childpublic org.apache.camel.spi.RouteContext getRouteContext()
getRouteContext
in interface org.apache.camel.Channel
protected void doStart() throws Exception
doStart
in class org.apache.camel.support.processor.DelegateAsyncProcessor
Exception
protected void doStop() throws Exception
doStop
in class org.apache.camel.support.processor.DelegateAsyncProcessor
Exception
protected void doShutdown() throws Exception
doShutdown
in class org.apache.camel.support.processor.DelegateAsyncProcessor
Exception
public void initChannel(ProcessorDefinition<?> outputDefinition, org.apache.camel.spi.RouteContext routeContext) throws Exception
ModelChannel
initChannel
in interface ModelChannel
outputDefinition
- the route definition the Channel
representsrouteContext
- the route contextException
- is thrown if some error occurredpublic void postInitChannel(ProcessorDefinition<?> outputDefinition, org.apache.camel.spi.RouteContext routeContext) throws Exception
ModelChannel
postInitChannel
in interface ModelChannel
outputDefinition
- the route definition the Channel
representsrouteContext
- the route contextException
- is thrown if some error occurredpublic String toString()
toString
in class CamelInternalProcessor
Apache Camel