Package org.apache.camel.impl.engine
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
DefaultChannel is the default
With this
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.-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.camel.impl.engine.CamelInternalProcessor
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
-
Field Summary
Fields inherited from class org.apache.camel.support.processor.DelegateAsyncProcessor
processor
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
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
protected void
doStart()
protected void
doStop()
org.apache.camel.Processor
org.apache.camel.Processor
org.apache.camel.Processor
org.apache.camel.Route
getRoute()
boolean
hasNext()
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) List
<org.apache.camel.Processor> next()
void
void
setErrorHandler
(org.apache.camel.Processor errorHandler) void
setOutput
(org.apache.camel.Processor output) toString()
Methods inherited from class org.apache.camel.impl.engine.CamelInternalProcessor
addAdvice, addManagementInterceptStrategy, addRouteInflightRepositoryAdvice, addRouteLifecycleAdvice, addRoutePolicyAdvice, doBuild, getAdvice, process, setRouteOnAdvices, unwrap, wrap
Methods inherited from class org.apache.camel.support.processor.DelegateAsyncProcessor
doInit, getProcessor, setProcessor, setProcessor
Methods inherited from class org.apache.camel.support.AsyncProcessorSupport
process, processAsync
Methods inherited from class org.apache.camel.support.service.BaseService
build, doFail, doLifecycleChange, doResume, 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.AsyncProcessor
process, processAsync
Methods inherited from interface org.apache.camel.Processor
process
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
-
Constructor Details
-
DefaultChannel
public DefaultChannel(org.apache.camel.CamelContext camelContext)
-
-
Method Details
-
getOutput
public org.apache.camel.Processor getOutput()- Specified by:
getOutput
in interfaceorg.apache.camel.Channel
-
hasNext
public boolean hasNext()- Specified by:
hasNext
in interfaceorg.apache.camel.Navigate<org.apache.camel.Processor>
- Overrides:
hasNext
in classorg.apache.camel.support.processor.DelegateAsyncProcessor
-
next
- Specified by:
next
in interfaceorg.apache.camel.Navigate<org.apache.camel.Processor>
- Overrides:
next
in classorg.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 interfaceorg.apache.camel.Channel
-
setErrorHandler
public void setErrorHandler(org.apache.camel.Processor errorHandler) - Specified by:
setErrorHandler
in interfaceorg.apache.camel.Channel
-
getErrorHandler
public org.apache.camel.Processor getErrorHandler()- Specified by:
getErrorHandler
in interfaceorg.apache.camel.Channel
-
getRoute
public org.apache.camel.Route getRoute()- Specified by:
getRoute
in interfaceorg.apache.camel.Channel
-
doStart
- Overrides:
doStart
in classorg.apache.camel.support.processor.DelegateAsyncProcessor
- Throws:
Exception
-
doStop
- Overrides:
doStop
in classorg.apache.camel.support.processor.DelegateAsyncProcessor
- Throws:
Exception
-
doShutdown
- Overrides:
doShutdown
in classCamelInternalProcessor
- 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 interfaceorg.apache.camel.Channel
- Throws:
Exception
-
postInitChannel
- Specified by:
postInitChannel
in interfaceorg.apache.camel.Channel
- Throws:
Exception
-
toString
- Overrides:
toString
in classCamelInternalProcessor
-