public class DefaultChannel extends CamelInternalProcessor implements org.apache.camel.Channel
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.DebuggerAdvice, CamelInternalProcessor.DelayerAdvice, CamelInternalProcessor.MessageHistoryAdvice, CamelInternalProcessor.NodeHistoryAdvice, CamelInternalProcessor.RouteInflightRepositoryAdvice, CamelInternalProcessor.RouteLifecycleAdvice, CamelInternalProcessor.RoutePolicyAdvice, CamelInternalProcessor.StreamCachingAdvice, CamelInternalProcessor.TracingAdvice, CamelInternalProcessor.UnitOfWorkProcessorAdvice
Constructor and Description |
---|
DefaultChannel(org.apache.camel.CamelContext camelContext) |
Modifier and Type | Method and Description |
---|---|
protected void |
doShutdown() |
protected void |
doStart() |
protected void |
doStop() |
org.apache.camel.Processor |
getErrorHandler() |
org.apache.camel.Processor |
getNextProcessor() |
org.apache.camel.Processor |
getOutput() |
org.apache.camel.NamedNode |
getProcessorDefinition() |
org.apache.camel.spi.RouteContext |
getRouteContext() |
boolean |
hasNext() |
void |
initChannel(org.apache.camel.spi.RouteContext routeContext,
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 route,
boolean first,
boolean routeScoped)
Initializes the channel.
|
boolean |
isRouteScoped() |
List<org.apache.camel.Processor> |
next() |
void |
postInitChannel()
Post initializes the channel.
|
void |
setDefinition(org.apache.camel.NamedNode definition) |
void |
setErrorHandler(org.apache.camel.Processor errorHandler)
Sets the
ErrorHandler this Channel uses. |
void |
setOutput(org.apache.camel.Processor output) |
String |
toString() |
addAdvice, getAdvice, process, unwrap, wrap
getProcessor, setProcessor, setProcessor
build, doBuild, doInit, doResume, doSuspend, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
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)
public org.apache.camel.Processor getNextProcessor()
getNextProcessor
in interface org.apache.camel.Channel
public void setErrorHandler(org.apache.camel.Processor errorHandler)
ErrorHandler
this Channel uses.errorHandler
- the error handlerpublic org.apache.camel.Processor getErrorHandler()
getErrorHandler
in interface org.apache.camel.Channel
public org.apache.camel.NamedNode getProcessorDefinition()
getProcessorDefinition
in interface org.apache.camel.Channel
public void setDefinition(org.apache.camel.NamedNode definition)
public 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 boolean isRouteScoped()
public void initChannel(org.apache.camel.spi.RouteContext routeContext, 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 route, boolean first, boolean routeScoped) throws Exception
routeContext
- the route contextdefinition
- the route definition the Channel
representschildDefinition
- the child definitionException
- is thrown if some error occurredpublic void postInitChannel() throws Exception
Exception
- is thrown if some error occurredpublic String toString()
toString
in class CamelInternalProcessor
Apache Camel