io.vertx.service

## Class ServiceVerticleFactory

- java.lang.Object
- - io.vertx.service.ServiceVerticleFactory

- All Implemented Interfaces:
    VerticleFactory
  Direct Known Subclasses:
    HttpServiceFactory, MavenVerticleFactory

      public class ServiceVerticleFactory
      extends Object
      implements VerticleFactory

  This verticle factory looks for a descriptor file on the classpath with a name given by the verticleName (with ':' replaced by '.' as ':' is an illegal file name character in Windows) and with ".json" appended to it. When it finds that file it deploys the actual verticle that's defined by the "main" field in that file. The descriptor file can also contain a field called "options" which is the JSON form of the DeploymentOptions class
  Author:
    Tim Fox

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ServiceVerticleFactory()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `createVerticle(String verticleName, ClassLoader classLoader, Promise<Callable<Verticle>> promise)` Create a verticle instance.
    `protected void` | `createVerticle(String verticleName, DeploymentOptions deploymentOptions, ClassLoader classLoader, Promise<Callable<Verticle>> promise)`
    `String` | `prefix()`

    - ### Methods inherited from class java.lang.Object

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

    - ### Methods inherited from interface io.vertx.core.spi.VerticleFactory

      `close, init, order, removePrefix`

- - ### Constructor Detail

    - #### ServiceVerticleFactory

          public ServiceVerticleFactory()

  - ### Method Detail

    - #### prefix

          public String prefix()

      Specified by:
        `prefix` in interface `VerticleFactory`
      Returns:
        The prefix for the factory, e.g. "java", or "js".

    - #### createVerticle

          public void createVerticle(String verticleName,
                                     ClassLoader classLoader,
                                     Promise<Callable<Verticle>> promise)

      Description copied from interface: `VerticleFactory`
      Create a verticle instance. If this method is likely to be slow (e.g. Ruby or JS verticles which might have to start up a language engine) then make sure it is run on a worker thread by `Vertx.executeBlocking(io.vertx.core.Handler<io.vertx.core.Promise<T>>, boolean, io.vertx.core.Handler<io.vertx.core.AsyncResult<T>>)`.
      Specified by:
        `createVerticle` in interface `VerticleFactory`
      Parameters:
        `verticleName` - The verticle name
        `classLoader` - The class loader
        `promise` - the promise to complete with the result

    - #### createVerticle

          protected void createVerticle(String verticleName,
                                        DeploymentOptions deploymentOptions,
                                        ClassLoader classLoader,
                                        Promise<Callable<Verticle>> promise)

Copyright © 2020 Eclipse. All rights reserved.