io.vertx.ext.httpservicefactory

## Class HttpServiceFactory

- java.lang.Object
- - io.vertx.service.ServiceVerticleFactory
  - - io.vertx.ext.httpservicefactory.HttpServiceFactory

- All Implemented Interfaces:
    VerticleFactory
  Direct Known Subclasses:
    HttpSecureServiceFactory

      public class HttpServiceFactory
      extends ServiceVerticleFactory

  Author:
    Julien Viet

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `AUTH_PASSWORD_PROPERTY`
    `static String` | `AUTH_USERNAME_PROPERTY`
    `static String` | `CACHE_DIR_PROPERTY`
    `static String` | `HTTP_CLIENT_OPTIONS_PROPERTY`
    `static String` | `HTTPS_CLIENT_OPTIONS_PROPERTY`
    `static String` | `KEYSERVER_URI_TEMPLATE`
    `static String` | `PROXY_HOST_PROPERTY`
    `static String` | `PROXY_PORT_PROPERTY`
    `static String` | `VALIDATION_POLICY`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `HttpServiceFactory()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected HttpClientOptions` | `configOptions()`
    `protected HttpClientOptions` | `createHttpClientOptions(String scheme)`
    `protected void` | `doRequest(HttpClient client, File file, URI url, File signatureFile, URI signatureURL, Handler<AsyncResult<io.vertx.ext.httpservicefactory.HttpServiceFactory.Result>> handler)`
    `void` | `init(Vertx vertx)` Initialise the factory
    `String` | `prefix()`
    `void` | `resolve(String identifier, DeploymentOptions deploymentOptions, ClassLoader classLoader, Future<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

    - #### CACHE_DIR_PROPERTY

          public static final String CACHE_DIR_PROPERTY

      See Also:
        Constant Field Values

    - #### HTTP_CLIENT_OPTIONS_PROPERTY

          public static final String HTTP_CLIENT_OPTIONS_PROPERTY

      See Also:
        Constant Field Values

    - #### HTTPS_CLIENT_OPTIONS_PROPERTY

          public static final String HTTPS_CLIENT_OPTIONS_PROPERTY

      See Also:
        Constant Field Values

    - #### AUTH_USERNAME_PROPERTY

          public static final String AUTH_USERNAME_PROPERTY

      See Also:
        Constant Field Values

    - #### AUTH_PASSWORD_PROPERTY

          public static final String AUTH_PASSWORD_PROPERTY

      See Also:
        Constant Field Values

    - #### PROXY_HOST_PROPERTY

          public static final String PROXY_HOST_PROPERTY

      See Also:
        Constant Field Values

    - #### PROXY_PORT_PROPERTY

          public static final String PROXY_PORT_PROPERTY

      See Also:
        Constant Field Values

    - #### KEYSERVER_URI_TEMPLATE

          public static final String KEYSERVER_URI_TEMPLATE

      See Also:
        Constant Field Values

    - #### VALIDATION_POLICY

          public static final String VALIDATION_POLICY

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### HttpServiceFactory

          public HttpServiceFactory()

  - ### Method Detail

    - #### init

          public void init(Vertx vertx)

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

    - #### createHttpClientOptions

          protected HttpClientOptions createHttpClientOptions(String scheme)

    - #### configOptions

          protected HttpClientOptions configOptions()

    - #### 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,
                              Future<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.

    - #### doRequest

          protected void doRequest(HttpClient client,
                                   File file,
                                   URI url,
                                   File signatureFile,
                                   URI signatureURL,
                                   Handler<AsyncResult<io.vertx.ext.httpservicefactory.HttpServiceFactory.Result>> handler)

Copyright © 2016. All rights reserved.