@ManagedResource(description="Clustered Route policy using") public final class ClusteredRoutePolicy extends RoutePolicySupport implements CamelContextAware
logshutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending| Modifier and Type | Method and Description |
|---|---|
void |
doShutdown()
Implementations override this method to perform customized shutdown.
|
void |
doStart()
Implementations override this method to support customized start/stop.
|
static ClusteredRoutePolicy |
forNamespace(CamelClusterService.Selector selector,
String namespace) |
static ClusteredRoutePolicy |
forNamespace(CamelClusterService service,
String namespace) |
static ClusteredRoutePolicy |
forNamespace(CamelContext camelContext,
CamelClusterService.Selector selector,
String namespace) |
static ClusteredRoutePolicy |
forNamespace(CamelContext camelContext,
String namespace) |
static ClusteredRoutePolicy |
forNamespace(String namespace) |
CamelContext |
getCamelContext()
Get the
CamelContext |
Duration |
getInitialDelay() |
boolean |
isLeader() |
void |
onInit(Route route)
Callback invoked when the
Route is being initialized |
void |
setCamelContext(CamelContext camelContext)
Injects the
CamelContext |
void |
setInitialDelay(Duration initialDelay) |
doStop, getExceptionHandler, handleException, onExchangeBegin, onExchangeDone, onRemove, onResume, onStart, onStop, onSuspend, resumeOrStartConsumer, resumeRoute, setExceptionHandler, startConsumer, startRoute, stopConsumer, stopRoute, stopRoute, stopRouteAsync, suspendOrStopConsumer, suspendRoute, suspendRoutedoResume, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendpublic CamelContext getCamelContext()
CamelContextAwareCamelContextgetCamelContext in interface CamelContextAwarepublic void setCamelContext(CamelContext camelContext)
CamelContextAwareCamelContextsetCamelContext in interface CamelContextAwarecamelContext - the Camel contextpublic Duration getInitialDelay()
public void setInitialDelay(Duration initialDelay)
public void onInit(Route route)
RoutePolicyRoute is being initializedonInit in interface RoutePolicyonInit in class RoutePolicySupportroute - the route being initializedpublic void doStart() throws Exception
ServiceSupportServiceSupport.doStop() for more details.doStart in class RoutePolicySupportExceptionServiceSupport.doStop()public void doShutdown() throws Exception
ServiceSupportdoShutdown in class ServiceSupportException@ManagedAttribute(description="Is this route the master or a slave") public boolean isLeader()
public static ClusteredRoutePolicy forNamespace(CamelContext camelContext, CamelClusterService.Selector selector, String namespace) throws Exception
Exceptionpublic static ClusteredRoutePolicy forNamespace(CamelContext camelContext, String namespace) throws Exception
Exceptionpublic static ClusteredRoutePolicy forNamespace(CamelClusterService service, String namespace) throws Exception
Exceptionpublic static ClusteredRoutePolicy forNamespace(CamelClusterService.Selector selector, String namespace) throws Exception
Exceptionpublic static ClusteredRoutePolicy forNamespace(String namespace) throws Exception
ExceptionApache Camel