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) |
build, doBuild, doFail, doInit, doLifecycleChange, doResume, doShutdown, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public void onInit(org.apache.camel.Route route)
onInit
in interface org.apache.camel.spi.RoutePolicy
public void onRemove(org.apache.camel.Route route)
onRemove
in interface org.apache.camel.spi.RoutePolicy
public void onStart(org.apache.camel.Route route)
onStart
in interface org.apache.camel.spi.RoutePolicy
public void onStop(org.apache.camel.Route route)
onStop
in interface org.apache.camel.spi.RoutePolicy
public void onSuspend(org.apache.camel.Route route)
onSuspend
in interface org.apache.camel.spi.RoutePolicy
public void onResume(org.apache.camel.Route route)
onResume
in interface org.apache.camel.spi.RoutePolicy
public void onExchangeBegin(org.apache.camel.Route route, org.apache.camel.Exchange exchange)
onExchangeBegin
in interface org.apache.camel.spi.RoutePolicy
public void onExchangeDone(org.apache.camel.Route route, org.apache.camel.Exchange exchange)
onExchangeDone
in interface org.apache.camel.spi.RoutePolicy
public void startConsumer(org.apache.camel.Consumer consumer) throws Exception
Exception
resumeOrStartConsumer(Consumer)
public void stopConsumer(org.apache.camel.Consumer consumer) throws Exception
Exception
suspendOrStopConsumer(Consumer)
public boolean suspendOrStopConsumer(org.apache.camel.Consumer consumer) throws Exception
Suspendable
then the consumer is suspended, otherwise the consumer is
stopped.Exception
stopConsumer(Consumer)
public boolean resumeOrStartConsumer(org.apache.camel.Consumer consumer) throws Exception
Suspendable
then the consumer is resumed, otherwise the consumer is
started.Exception
startConsumer(Consumer)
public void resumeRoute(org.apache.camel.Route route) throws Exception
Exception
public void suspendRoute(org.apache.camel.Route route) throws Exception
Exception
public void suspendRoute(org.apache.camel.Route route, long timeout, TimeUnit timeUnit) throws Exception
Exception
public void stopRoute(org.apache.camel.Route route) throws Exception
Exception
stopRouteAsync(Route)
public void stopRoute(org.apache.camel.Route route, long timeout, TimeUnit timeUnit) throws Exception
Exception
stopRouteAsync(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.BaseService
Exception
protected void doStop() throws Exception
doStop
in class org.apache.camel.support.service.BaseService
Exception
public org.apache.camel.spi.ExceptionHandler getExceptionHandler()
public void setExceptionHandler(org.apache.camel.spi.ExceptionHandler exceptionHandler)
Apache Camel