public class DefaultRoute
extends org.apache.camel.support.service.ServiceSupport
implements org.apache.camel.Route
Route
.
Use the API from CamelContext
to control the lifecycle of a route, such as starting and
stopping using the RouteController.startRoute(String)
and
RouteController.stopRoute(String)
methods.Constructor and Description |
---|
DefaultRoute(org.apache.camel.CamelContext camelContext,
org.apache.camel.NamedNode route,
String routeId,
String routeDescription,
org.apache.camel.Endpoint endpoint) |
Modifier and Type | Method and Description |
---|---|
void |
addErrorHandler(org.apache.camel.ErrorHandlerFactory factory,
org.apache.camel.NamedNode onException) |
void |
addErrorHandlerFactoryReference(org.apache.camel.ErrorHandlerFactory source,
org.apache.camel.ErrorHandlerFactory target) |
void |
addService(org.apache.camel.Service service) |
protected void |
addServices(List<org.apache.camel.Service> services)
Factory method to lazily create the complete list of services required for this route such as adding the
processor or consumer
|
void |
clearModelReferences() |
org.apache.camel.Processor |
createErrorHandler(org.apache.camel.Processor processor) |
protected void |
doShutdown() |
protected void |
doStart() |
protected void |
doStop() |
List<org.apache.camel.Processor> |
filter(String pattern) |
org.apache.camel.CamelContext |
getCamelContext() |
org.apache.camel.Consumer |
getConsumer() |
Long |
getDelayer() |
String |
getDescription() |
org.apache.camel.Endpoint |
getEndpoint() |
org.apache.camel.ErrorHandlerFactory |
getErrorHandlerFactory() |
Set<org.apache.camel.NamedNode> |
getErrorHandlers(org.apache.camel.ErrorHandlerFactory factory) |
List<org.apache.camel.Processor> |
getEventDrivenProcessors() |
String |
getGroup() |
String |
getId() |
List<org.apache.camel.spi.InterceptStrategy> |
getInterceptStrategies() |
org.apache.camel.spi.RouteError |
getLastError() |
org.apache.camel.spi.ManagementInterceptStrategy |
getManagementInterceptStrategy() |
org.apache.camel.Processor |
getOnCompletion(String onCompletionId) |
Collection<org.apache.camel.Processor> |
getOnCompletions() |
org.apache.camel.Processor |
getOnException(String onExceptionId) |
Collection<org.apache.camel.Processor> |
getOnExceptions() |
org.apache.camel.Processor |
getProcessor() |
Map<String,Object> |
getProperties() |
org.apache.camel.NamedNode |
getRoute() |
org.apache.camel.spi.RouteController |
getRouteController() |
String |
getRouteDescription() |
String |
getRouteId() |
List<org.apache.camel.spi.RoutePolicy> |
getRoutePolicyList() |
List<org.apache.camel.Service> |
getServices() |
org.apache.camel.ShutdownRoute |
getShutdownRoute() |
org.apache.camel.ShutdownRunningTask |
getShutdownRunningTask() |
Integer |
getStartupOrder() |
String |
getTracingPattern() |
String |
getUptime() |
long |
getUptimeMillis() |
Boolean |
isAllowUseOriginalMessage() |
Boolean |
isAutoStartup() |
Boolean |
isBacklogTracing() |
Boolean |
isCaseInsensitiveHeaders() |
Boolean |
isDebugging() |
Boolean |
isLogExhaustedMessageBody() |
Boolean |
isLogMask() |
Boolean |
isMessageHistory() |
Boolean |
isStreamCaching() |
Boolean |
isTracing() |
org.apache.camel.Navigate<org.apache.camel.Processor> |
navigate() |
void |
onStartingServices(List<org.apache.camel.Service> services) |
void |
setAllowUseOriginalMessage(Boolean allowUseOriginalMessage) |
void |
setAutoStartup(Boolean autoStartup) |
void |
setBacklogTracing(Boolean backlogTrace) |
void |
setCaseInsensitiveHeaders(Boolean caseInsensitiveHeaders) |
void |
setDebugging(Boolean debugging) |
void |
setDelayer(Long delay) |
void |
setErrorHandlerFactory(org.apache.camel.ErrorHandlerFactory errorHandlerFactory) |
void |
setLastError(org.apache.camel.spi.RouteError routeError) |
void |
setLogExhaustedMessageBody(Boolean logExhaustedMessageBody) |
void |
setLogMask(Boolean logMask) |
void |
setManagementInterceptStrategy(org.apache.camel.spi.ManagementInterceptStrategy interceptStrategy) |
void |
setMessageHistory(Boolean messageHistory) |
void |
setOnCompletion(String onCompletionId,
org.apache.camel.Processor processor) |
void |
setOnException(String onExceptionId,
org.apache.camel.Processor processor) |
void |
setProcessor(org.apache.camel.Processor processor) |
void |
setRouteController(org.apache.camel.spi.RouteController routeController) |
void |
setShutdownRoute(org.apache.camel.ShutdownRoute shutdownRoute) |
void |
setShutdownRunningTask(org.apache.camel.ShutdownRunningTask shutdownRunningTask) |
void |
setStartupOrder(Integer startupOrder) |
void |
setStreamCaching(Boolean cache) |
void |
setTracing(Boolean tracing) |
void |
setTracingPattern(String tracePattern) |
void |
start()
Do not invoke this method directly, use
RouteController.startRoute(String) to start
a route. |
void |
stop()
Do not invoke this method directly, use
RouteController.stopRoute(String) to stop a
route. |
boolean |
supportsSuspension() |
String |
toString() |
void |
warmUp() |
build, doBuild, doFail, doInit, doLifecycleChange, doResume, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, suspend
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public org.apache.camel.Processor createErrorHandler(org.apache.camel.Processor processor) throws Exception
createErrorHandler
in interface org.apache.camel.Route
Exception
public String getId()
getId
in interface org.apache.camel.Route
public String getGroup()
getGroup
in interface org.apache.camel.Route
public String getUptime()
getUptime
in interface org.apache.camel.Route
public long getUptimeMillis()
getUptimeMillis
in interface org.apache.camel.Route
public org.apache.camel.Endpoint getEndpoint()
getEndpoint
in interface org.apache.camel.Route
public org.apache.camel.CamelContext getCamelContext()
getCamelContext
in interface org.apache.camel.Route
public Map<String,Object> getProperties()
getProperties
in interface org.apache.camel.Route
public String getDescription()
getDescription
in interface org.apache.camel.Route
public void onStartingServices(List<org.apache.camel.Service> services) throws Exception
onStartingServices
in interface org.apache.camel.Route
Exception
public List<org.apache.camel.Service> getServices()
getServices
in interface org.apache.camel.Route
public void addService(org.apache.camel.Service service)
addService
in interface org.apache.camel.Route
public void warmUp()
warmUp
in interface org.apache.camel.Route
public void start()
RouteController.startRoute(String)
to start
a route.start
in interface org.apache.camel.Service
start
in class org.apache.camel.support.service.BaseService
public void stop()
RouteController.stopRoute(String)
to stop a
route.stop
in interface org.apache.camel.Service
stop
in class org.apache.camel.support.service.BaseService
protected void doStart() throws Exception
doStart
in class org.apache.camel.support.service.BaseService
Exception
protected void doStop() throws Exception
doStop
in class org.apache.camel.support.service.BaseService
Exception
protected void doShutdown() throws Exception
doShutdown
in class org.apache.camel.support.service.BaseService
Exception
public org.apache.camel.spi.RouteError getLastError()
getLastError
in interface org.apache.camel.Route
public void setLastError(org.apache.camel.spi.RouteError routeError)
setLastError
in interface org.apache.camel.Route
public Integer getStartupOrder()
getStartupOrder
in interface org.apache.camel.Route
public void setStartupOrder(Integer startupOrder)
setStartupOrder
in interface org.apache.camel.Route
public org.apache.camel.spi.RouteController getRouteController()
getRouteController
in interface org.apache.camel.Route
public void setRouteController(org.apache.camel.spi.RouteController routeController)
setRouteController
in interface org.apache.camel.Route
public Boolean isAutoStartup()
isAutoStartup
in interface org.apache.camel.Route
isAutoStartup
in interface org.apache.camel.RuntimeConfiguration
public void setAutoStartup(Boolean autoStartup)
setAutoStartup
in interface org.apache.camel.Route
setAutoStartup
in interface org.apache.camel.RuntimeConfiguration
public org.apache.camel.NamedNode getRoute()
getRoute
in interface org.apache.camel.Route
public String getRouteId()
getRouteId
in interface org.apache.camel.Route
public String getRouteDescription()
getRouteDescription
in interface org.apache.camel.Route
public List<org.apache.camel.Processor> getEventDrivenProcessors()
getEventDrivenProcessors
in interface org.apache.camel.Route
public List<org.apache.camel.spi.InterceptStrategy> getInterceptStrategies()
getInterceptStrategies
in interface org.apache.camel.Route
public void setManagementInterceptStrategy(org.apache.camel.spi.ManagementInterceptStrategy interceptStrategy)
setManagementInterceptStrategy
in interface org.apache.camel.Route
public org.apache.camel.spi.ManagementInterceptStrategy getManagementInterceptStrategy()
getManagementInterceptStrategy
in interface org.apache.camel.Route
public void setTracing(Boolean tracing)
setTracing
in interface org.apache.camel.RuntimeConfiguration
public Boolean isTracing()
isTracing
in interface org.apache.camel.RuntimeConfiguration
public String getTracingPattern()
getTracingPattern
in interface org.apache.camel.RuntimeConfiguration
public void setTracingPattern(String tracePattern)
setTracingPattern
in interface org.apache.camel.RuntimeConfiguration
public void setBacklogTracing(Boolean backlogTrace)
setBacklogTracing
in interface org.apache.camel.RuntimeConfiguration
public Boolean isBacklogTracing()
isBacklogTracing
in interface org.apache.camel.RuntimeConfiguration
public void setDebugging(Boolean debugging)
setDebugging
in interface org.apache.camel.RuntimeConfiguration
public Boolean isDebugging()
isDebugging
in interface org.apache.camel.RuntimeConfiguration
public void setMessageHistory(Boolean messageHistory)
setMessageHistory
in interface org.apache.camel.RuntimeConfiguration
public Boolean isMessageHistory()
isMessageHistory
in interface org.apache.camel.RuntimeConfiguration
public void setLogMask(Boolean logMask)
setLogMask
in interface org.apache.camel.RuntimeConfiguration
public Boolean isLogMask()
isLogMask
in interface org.apache.camel.RuntimeConfiguration
public void setLogExhaustedMessageBody(Boolean logExhaustedMessageBody)
setLogExhaustedMessageBody
in interface org.apache.camel.RuntimeConfiguration
public Boolean isLogExhaustedMessageBody()
isLogExhaustedMessageBody
in interface org.apache.camel.RuntimeConfiguration
public void setStreamCaching(Boolean cache)
setStreamCaching
in interface org.apache.camel.RuntimeConfiguration
public Boolean isStreamCaching()
isStreamCaching
in interface org.apache.camel.RuntimeConfiguration
public void setDelayer(Long delay)
setDelayer
in interface org.apache.camel.RuntimeConfiguration
public Long getDelayer()
getDelayer
in interface org.apache.camel.RuntimeConfiguration
public void setErrorHandlerFactory(org.apache.camel.ErrorHandlerFactory errorHandlerFactory)
setErrorHandlerFactory
in interface org.apache.camel.Route
public org.apache.camel.ErrorHandlerFactory getErrorHandlerFactory()
getErrorHandlerFactory
in interface org.apache.camel.Route
public void setShutdownRoute(org.apache.camel.ShutdownRoute shutdownRoute)
setShutdownRoute
in interface org.apache.camel.RuntimeConfiguration
public void setAllowUseOriginalMessage(Boolean allowUseOriginalMessage)
setAllowUseOriginalMessage
in interface org.apache.camel.RuntimeConfiguration
public Boolean isAllowUseOriginalMessage()
isAllowUseOriginalMessage
in interface org.apache.camel.RuntimeConfiguration
public Boolean isCaseInsensitiveHeaders()
isCaseInsensitiveHeaders
in interface org.apache.camel.RuntimeConfiguration
public void setCaseInsensitiveHeaders(Boolean caseInsensitiveHeaders)
setCaseInsensitiveHeaders
in interface org.apache.camel.RuntimeConfiguration
public org.apache.camel.ShutdownRoute getShutdownRoute()
getShutdownRoute
in interface org.apache.camel.RuntimeConfiguration
public void setShutdownRunningTask(org.apache.camel.ShutdownRunningTask shutdownRunningTask)
setShutdownRunningTask
in interface org.apache.camel.RuntimeConfiguration
public org.apache.camel.ShutdownRunningTask getShutdownRunningTask()
getShutdownRunningTask
in interface org.apache.camel.RuntimeConfiguration
public List<org.apache.camel.spi.RoutePolicy> getRoutePolicyList()
getRoutePolicyList
in interface org.apache.camel.Route
public Collection<org.apache.camel.Processor> getOnCompletions()
getOnCompletions
in interface org.apache.camel.Route
public org.apache.camel.Processor getOnCompletion(String onCompletionId)
getOnCompletion
in interface org.apache.camel.Route
public void setOnCompletion(String onCompletionId, org.apache.camel.Processor processor)
setOnCompletion
in interface org.apache.camel.Route
public Collection<org.apache.camel.Processor> getOnExceptions()
getOnExceptions
in interface org.apache.camel.Route
public org.apache.camel.Processor getOnException(String onExceptionId)
getOnException
in interface org.apache.camel.Route
public void setOnException(String onExceptionId, org.apache.camel.Processor processor)
setOnException
in interface org.apache.camel.Route
public Set<org.apache.camel.NamedNode> getErrorHandlers(org.apache.camel.ErrorHandlerFactory factory)
getErrorHandlers
in interface org.apache.camel.Route
public void addErrorHandler(org.apache.camel.ErrorHandlerFactory factory, org.apache.camel.NamedNode onException)
addErrorHandler
in interface org.apache.camel.Route
public void addErrorHandlerFactoryReference(org.apache.camel.ErrorHandlerFactory source, org.apache.camel.ErrorHandlerFactory target)
addErrorHandlerFactoryReference
in interface org.apache.camel.Route
public org.apache.camel.Processor getProcessor()
getProcessor
in interface org.apache.camel.Route
public void setProcessor(org.apache.camel.Processor processor)
protected void addServices(List<org.apache.camel.Service> services) throws Exception
Exception
public org.apache.camel.Navigate<org.apache.camel.Processor> navigate()
navigate
in interface org.apache.camel.Route
public List<org.apache.camel.Processor> filter(String pattern)
filter
in interface org.apache.camel.Route
public org.apache.camel.Consumer getConsumer()
getConsumer
in interface org.apache.camel.Route
public boolean supportsSuspension()
supportsSuspension
in interface org.apache.camel.Route
public void clearModelReferences()
Apache Camel