Class SpringVerticleFactory

  • All Implemented Interfaces:
    io.vertx.core.spi.VerticleFactory

    public class SpringVerticleFactory
    extends Object
    implements io.vertx.core.spi.VerticleFactory
    A Vertx Spring factory that creates a spring verticle and loads for each verticle instance a spring context
    Author:
    Andy Moncsek , Johannes Schüth
    • Constructor Detail

      • SpringVerticleFactory

        public SpringVerticleFactory()
    • Method Detail

      • prefix

        public String prefix()
        Specified by:
        prefix in interface io.vertx.core.spi.VerticleFactory
      • init

        public void init​(io.vertx.core.Vertx vertx)
        Specified by:
        init in interface io.vertx.core.spi.VerticleFactory
      • createVerticle

        public io.vertx.core.Verticle createVerticle​(String verticleName,
                                                     ClassLoader classLoader)
                                              throws Exception
        Specified by:
        createVerticle in interface io.vertx.core.spi.VerticleFactory
        Throws:
        Exception
      • initSpring

        public static void initSpring​(io.vertx.core.AbstractVerticle verticle)
        Initialize a Spring Context for given Verticle instance. A Verticle MUST be annotated with SpringVerticle
        Parameters:
        verticle - The Verticle Instance where to start the Spring Context
      • close

        public void close()
        Specified by:
        close in interface io.vertx.core.spi.VerticleFactory