Class VertXReactiveExecutor

  • All Implemented Interfaces:
    AutoCloseable, org.apache.camel.CamelContextAware, org.apache.camel.Service, org.apache.camel.ShutdownableService, org.apache.camel.spi.ReactiveExecutor, org.apache.camel.StatefulService, org.apache.camel.StaticService, org.apache.camel.SuspendableService

    @JdkService("reactive-executor")
    public class VertXReactiveExecutor
    extends org.apache.camel.support.service.ServiceSupport
    implements org.apache.camel.CamelContextAware, org.apache.camel.spi.ReactiveExecutor, org.apache.camel.StaticService
    A VertX based ReactiveExecutor that uses Vert X event loop.

    NOTE: This is an experimental implementation (use with care)

    • Field Summary

      • 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
      • Fields inherited from interface org.apache.camel.spi.ReactiveExecutor

        FACTORY
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void doInit()  
      protected void doStart()  
      boolean executeFromQueue()  
      org.apache.camel.CamelContext getCamelContext()  
      io.vertx.core.Vertx getVertx()  
      void schedule​(Runnable runnable)  
      void scheduleMain​(Runnable runnable)  
      void scheduleSync​(Runnable runnable)  
      void setCamelContext​(org.apache.camel.CamelContext camelContext)  
      void setVertx​(io.vertx.core.Vertx vertx)
      To use an existing instance of Vertx instead of creating a default instance.
      String toString()  
      • Methods inherited from class org.apache.camel.support.service.BaseService

        build, doBuild, doFail, doLifecycleChange, doResume, doShutdown, doStop, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
      • Methods inherited from interface org.apache.camel.Service

        build, close, init, start, stop
      • Methods inherited from interface org.apache.camel.ShutdownableService

        shutdown
      • 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 Detail

      • VertXReactiveExecutor

        public VertXReactiveExecutor()
    • Method Detail

      • getCamelContext

        public org.apache.camel.CamelContext getCamelContext()
        Specified by:
        getCamelContext in interface org.apache.camel.CamelContextAware
      • setCamelContext

        public void setCamelContext​(org.apache.camel.CamelContext camelContext)
        Specified by:
        setCamelContext in interface org.apache.camel.CamelContextAware
      • getVertx

        public io.vertx.core.Vertx getVertx()
      • setVertx

        public void setVertx​(io.vertx.core.Vertx vertx)
        To use an existing instance of Vertx instead of creating a default instance.
      • doInit

        protected void doInit()
                       throws Exception
        Overrides:
        doInit in class org.apache.camel.support.service.BaseService
        Throws:
        Exception
      • doStart

        protected void doStart()
                        throws Exception
        Overrides:
        doStart in class org.apache.camel.support.service.BaseService
        Throws:
        Exception
      • schedule

        public void schedule​(Runnable runnable)
        Specified by:
        schedule in interface org.apache.camel.spi.ReactiveExecutor
      • scheduleMain

        public void scheduleMain​(Runnable runnable)
        Specified by:
        scheduleMain in interface org.apache.camel.spi.ReactiveExecutor
      • scheduleSync

        public void scheduleSync​(Runnable runnable)
        Specified by:
        scheduleSync in interface org.apache.camel.spi.ReactiveExecutor
      • executeFromQueue

        public boolean executeFromQueue()
        Specified by:
        executeFromQueue in interface org.apache.camel.spi.ReactiveExecutor