public abstract class RoutePolicySupport
extends org.apache.camel.support.service.ServiceSupport
implements org.apache.camel.spi.RoutePolicy
RoutePolicy implementations.| Constructor and Description |
|---|
RoutePolicySupport() |
| Modifier and Type | Method and Description |
|---|---|
protected org.apache.camel.spi.RouteController |
controller(org.apache.camel.Route route) |
protected void |
doStart() |
protected void |
doStop() |
org.apache.camel.spi.ExceptionHandler |
getExceptionHandler() |
protected void |
handleException(Throwable t)
Handles the given exception using the
getExceptionHandler() |
void |
onExchangeBegin(org.apache.camel.Route route,
org.apache.camel.Exchange exchange) |
void |
onExchangeDone(org.apache.camel.Route route,
org.apache.camel.Exchange exchange) |
void |
onInit(org.apache.camel.Route route) |
void |
onRemove(org.apache.camel.Route route) |
void |
onResume(org.apache.camel.Route route) |
void |
onStart(org.apache.camel.Route route) |
void |
onStop(org.apache.camel.Route route) |
void |
onSuspend(org.apache.camel.Route route) |
boolean |
resumeOrStartConsumer(org.apache.camel.Consumer consumer)
Resumes or starts the consumer.
|
void |
resumeRoute(org.apache.camel.Route route) |
void |
setExceptionHandler(org.apache.camel.spi.ExceptionHandler exceptionHandler) |
void |
startConsumer(org.apache.camel.Consumer consumer)
Starts the consumer.
|
void |
startRoute(org.apache.camel.Route route) |
void |
stopConsumer(org.apache.camel.Consumer consumer)
Stops the consumer.
|
void |
stopRoute(org.apache.camel.Route route) |
void |
stopRoute(org.apache.camel.Route route,
long timeout,
TimeUnit timeUnit) |
void |
stopRouteAsync(org.apache.camel.Route route)
Allows to stop a route asynchronously using a separate background thread which can allow any current in-flight exchange
to complete while the route is being shutdown.
|
boolean |
suspendOrStopConsumer(org.apache.camel.Consumer consumer)
Suspends or stops the consumer.
|
void |
suspendRoute(org.apache.camel.Route route) |
void |
suspendRoute(org.apache.camel.Route route,
long timeout,
TimeUnit timeUnit) |
doInit, doResume, doShutdown, doSuspend, getStatus, init, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendpublic void onInit(org.apache.camel.Route route)
onInit in interface org.apache.camel.spi.RoutePolicypublic void onRemove(org.apache.camel.Route route)
onRemove in interface org.apache.camel.spi.RoutePolicypublic void onStart(org.apache.camel.Route route)
onStart in interface org.apache.camel.spi.RoutePolicypublic void onStop(org.apache.camel.Route route)
onStop in interface org.apache.camel.spi.RoutePolicypublic void onSuspend(org.apache.camel.Route route)
onSuspend in interface org.apache.camel.spi.RoutePolicypublic void onResume(org.apache.camel.Route route)
onResume in interface org.apache.camel.spi.RoutePolicypublic void onExchangeBegin(org.apache.camel.Route route,
org.apache.camel.Exchange exchange)
onExchangeBegin in interface org.apache.camel.spi.RoutePolicypublic void onExchangeDone(org.apache.camel.Route route,
org.apache.camel.Exchange exchange)
onExchangeDone in interface org.apache.camel.spi.RoutePolicypublic void startConsumer(org.apache.camel.Consumer consumer)
throws Exception
ExceptionresumeOrStartConsumer(Consumer)public void stopConsumer(org.apache.camel.Consumer consumer)
throws Exception
ExceptionsuspendOrStopConsumer(Consumer)public boolean suspendOrStopConsumer(org.apache.camel.Consumer consumer)
throws Exception
Suspendable then the consumer is suspended,
otherwise the consumer is stopped.ExceptionstopConsumer(Consumer)public boolean resumeOrStartConsumer(org.apache.camel.Consumer consumer)
throws Exception
Suspendable then the consumer is resumed,
otherwise the consumer is started.ExceptionstartConsumer(Consumer)public void resumeRoute(org.apache.camel.Route route)
throws Exception
Exceptionpublic void suspendRoute(org.apache.camel.Route route)
throws Exception
Exceptionpublic void suspendRoute(org.apache.camel.Route route,
long timeout,
TimeUnit timeUnit)
throws Exception
Exceptionpublic void stopRoute(org.apache.camel.Route route)
throws Exception
ExceptionstopRouteAsync(Route)public void stopRoute(org.apache.camel.Route route,
long timeout,
TimeUnit timeUnit)
throws Exception
ExceptionstopRouteAsync(Route)public void stopRouteAsync(org.apache.camel.Route route)
protected org.apache.camel.spi.RouteController controller(org.apache.camel.Route route)
protected void handleException(Throwable t)
getExceptionHandler()t - the exception to handleprotected void doStart()
throws Exception
doStart in class org.apache.camel.support.service.ServiceSupportExceptionprotected void doStop()
throws Exception
doStop in class org.apache.camel.support.service.ServiceSupportExceptionpublic org.apache.camel.spi.ExceptionHandler getExceptionHandler()
public void setExceptionHandler(org.apache.camel.spi.ExceptionHandler exceptionHandler)
Apache Camel