io.vertx.maven

## Class MavenVerticleFactory

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

- All Implemented Interfaces:
    VerticleFactory

      public class MavenVerticleFactory
      extends ServiceVerticleFactory

  Author:
    Tim Fox

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `HTTP_PROXY_SYS_PROP`
    `static String` | `HTTPS_PROXY_SYS_PROP`
    `static String` | `LOCAL_REPO_SYS_PROP`
    `static String` | `REMOTE_REPOS_SYS_PROP`
    `static String` | `REMOTE_SNAPSHOT_POLICY_SYS_PROP`
    `static boolean` | `RESOLVE_CALLED`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MavenVerticleFactory()` Creates an instance of `MavenVerticleFactory` using the system properties to initialize the `ResolverOptions`.
    `MavenVerticleFactory(Resolver resolver)` Creates an instance of `MavenVerticleFactory` with a custom `Resolver`.
    `MavenVerticleFactory(ResolverOptions options)` Creates an instance of `MavenVerticleFactory` with the given resolution options.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Resolver` | `getResolver()`
    `void` | `init(Vertx vertx)` Initialise the factory
    `String` | `prefix()`
    `void` | `resolve(String identifier, DeploymentOptions deploymentOptions, ClassLoader classLoader, Promise<String> resolution)` Some verticle factories can "resolve" the identifer to another identifier which is then used to look up the real verticle factory.

    - ### Methods inherited from class io.vertx.service.ServiceVerticleFactory

      `createVerticle, requiresResolve`

    - ### 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

      `blockingCreate, close, order, removePrefix`

- - ### Field Detail

    - #### LOCAL_REPO_SYS_PROP

          public static final String LOCAL_REPO_SYS_PROP

      See Also:
        Constant Field Values

    - #### REMOTE_REPOS_SYS_PROP

          public static final String REMOTE_REPOS_SYS_PROP

      See Also:
        Constant Field Values

    - #### HTTP_PROXY_SYS_PROP

          public static final String HTTP_PROXY_SYS_PROP

      See Also:
        Constant Field Values

    - #### HTTPS_PROXY_SYS_PROP

          public static final String HTTPS_PROXY_SYS_PROP

      See Also:
        Constant Field Values

    - #### REMOTE_SNAPSHOT_POLICY_SYS_PROP

          public static final String REMOTE_SNAPSHOT_POLICY_SYS_PROP

      See Also:
        Constant Field Values

    - #### RESOLVE_CALLED

          public static volatile boolean RESOLVE_CALLED

  - ### Constructor Detail

    - #### MavenVerticleFactory

          public MavenVerticleFactory()

      Creates an instance of `MavenVerticleFactory` using the system properties to initialize the `ResolverOptions`.

      It uses the default resolver implementation.

    - #### MavenVerticleFactory

          public MavenVerticleFactory(ResolverOptions options)

      Creates an instance of `MavenVerticleFactory` with the given resolution options.

      It uses the default resolver implementation.
      Parameters:
        `options` - the options.

    - #### MavenVerticleFactory

          public MavenVerticleFactory(Resolver resolver)

      Creates an instance of `MavenVerticleFactory` with a custom `Resolver`. The resolver must already be configured.
      Parameters:
        `resolver` - the resolver to use

  - ### Method Detail

    - #### init

          public void init(Vertx vertx)

      Description copied from interface: `VerticleFactory`
      Initialise the factory
      Parameters:
        `vertx` - The Vert.x instance

    - #### prefix

          public String prefix()

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

    - #### resolve

          public void resolve(String identifier,
                              DeploymentOptions deploymentOptions,
                              ClassLoader classLoader,
                              Promise<String> resolution)

      Description copied from interface: `VerticleFactory`
      Some verticle factories can "resolve" the identifer to another identifier which is then used to look up the real verticle factory. An Example is the Vert.x service factory which takes an identifier of form `service:com.mycompany.clever-db-service" then looks for a JSON file which it loads to get the real identifier (main verticle).
      Specified by:
        `resolve` in interface `VerticleFactory`
      Overrides:
        `resolve` in class `ServiceVerticleFactory`
      Parameters:
        `identifier` - The identifier
        `deploymentOptions` - The deployment options - these can be changed inside the resolve method (e.g. to add an extra classpath)
        `classLoader` - The classloader
        `resolution` - A future which will receive the result of the resolution.

    - #### getResolver

          public Resolver getResolver()

      Returns:
        the underlying resolver instance.

Copyright © 2021 Eclipse. All rights reserved.