Class RouteService

java.lang.Object
org.apache.camel.support.service.BaseService
org.apache.camel.support.service.ServiceSupport
org.apache.camel.support.ChildServiceSupport
org.apache.camel.impl.engine.RouteService
All Implemented Interfaces:
AutoCloseable, org.apache.camel.Service, org.apache.camel.ShutdownableService, org.apache.camel.StatefulService, org.apache.camel.SuspendableService

public class RouteService extends org.apache.camel.support.ChildServiceSupport
Represents the runtime objects for a given route so that it can be stopped independently of other routes
  • Field Summary

    Fields inherited from class org.apache.camel.support.ChildServiceSupport

    childServices

    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

    Constructors
    Constructor
    Description
    RouteService(org.apache.camel.Route route)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    doGetRouteServices(List<org.apache.camel.Service> services)
    Gather all other kind of route services from the given route, except error handler
    protected void
     
    protected void
     
    protected void
     
    protected void
     
    protected void
     
    protected void
     
    protected void
     
    Set<org.apache.camel.Endpoint>
    Gather all the endpoints this route service uses
    org.apache.camel.CamelContext
     
     
    org.apache.camel.Consumer
     
    org.apache.camel.Route
     
    protected void
    initChildServices(List<org.apache.camel.Service> services)
     
    boolean
     
    boolean
     
    void
    setRemovingRoutes(boolean removingRoutes)
     
    void
     
    protected void
    startChildServices(org.apache.camel.Route route, List<org.apache.camel.Service> services)
     
    protected void
    stopChildServices(org.apache.camel.Route route, Set<org.apache.camel.Service> services, boolean shutdown)
     
    void
     

    Methods inherited from class org.apache.camel.support.ChildServiceSupport

    addChildService, removeChildService, shutdown, start, stop

    Methods inherited from class org.apache.camel.support.service.BaseService

    build, doBuild, doFail, doInit, doLifecycleChange, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, suspend

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.apache.camel.Service

    build, close, init

    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

    • RouteService

      public RouteService(org.apache.camel.Route route)
  • Method Details

    • getId

      public String getId()
    • getCamelContext

      public org.apache.camel.CamelContext getCamelContext()
    • getRoute

      public org.apache.camel.Route getRoute()
    • gatherEndpoints

      public Set<org.apache.camel.Endpoint> gatherEndpoints()
      Gather all the endpoints this route service uses

      This implementation finds the endpoints by searching all the child services for EndpointAware processors which uses an endpoint.

    • getInput

      public org.apache.camel.Consumer getInput()
    • isRemovingRoutes

      public boolean isRemovingRoutes()
    • setRemovingRoutes

      public void setRemovingRoutes(boolean removingRoutes)
    • warmUp

      public void warmUp() throws org.apache.camel.FailedToStartRouteException
      Throws:
      org.apache.camel.FailedToStartRouteException
    • setUp

      public void setUp() throws org.apache.camel.FailedToStartRouteException
      Throws:
      org.apache.camel.FailedToStartRouteException
    • isAutoStartup

      public boolean isAutoStartup()
    • doSetup

      protected void doSetup() throws Exception
      Throws:
      Exception
    • doWarmUp

      protected void doWarmUp() throws Exception
      Throws:
      Exception
    • doStart

      protected void doStart()
      Overrides:
      doStart in class org.apache.camel.support.service.BaseService
    • doStop

      protected void doStop()
      Overrides:
      doStop in class org.apache.camel.support.service.BaseService
    • doShutdown

      protected void doShutdown()
      Overrides:
      doShutdown in class org.apache.camel.support.service.BaseService
    • doSuspend

      protected void doSuspend()
      Overrides:
      doSuspend in class org.apache.camel.support.service.BaseService
    • doResume

      protected void doResume()
      Overrides:
      doResume in class org.apache.camel.support.service.BaseService
    • initChildServices

      protected void initChildServices(List<org.apache.camel.Service> services)
    • startChildServices

      protected void startChildServices(org.apache.camel.Route route, List<org.apache.camel.Service> services)
    • stopChildServices

      protected void stopChildServices(org.apache.camel.Route route, Set<org.apache.camel.Service> services, boolean shutdown)
    • doGetRouteServices

      protected void doGetRouteServices(List<org.apache.camel.Service> services)
      Gather all other kind of route services from the given route, except error handler