io.vertx.core.net

## Class JksOptions

- java.lang.Object
- - io.vertx.core.net.JksOptions

- All Implemented Interfaces:
    KeyCertOptions, TrustOptions, Cloneable

      public class JksOptions
      extends Object
      implements KeyCertOptions, TrustOptions, Cloneable

  Key or trust store options configuring private key and/or certificates based on Java Keystore files.

  When used as a key store, it should point to a store containing a private key and its certificate. When used as a trust store, it should point to a store containing a list of trusted certificates.

  The store can either be loaded by Vert.x from the filesystem:

       HttpServerOptions options = HttpServerOptions.httpServerOptions();
       options.setKeyStore(new JKSOptions().setPath("/mykeystore.jks").setPassword("foo"));

  Or directly provided as a buffer:

       Buffer store = vertx.fileSystem().readFileSync("/mykeystore.jks");
       options.setKeyStore(new JKSOptions().setValue(store).setPassword("foo"));

  Author:
    Julien Viet, Tim Fox

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `JksOptions()` Default constructor
    `JksOptions(JksOptions other)` Copy constructor
    `JksOptions(JsonObject json)` Create options from JSON

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `JksOptions` | `clone()`
    `JksOptions` | `copy()`
    `boolean` | `equals(Object o)`
    `String` | `getPassword()`
    `String` | `getPath()` Get the path to the ksy store
    `Buffer` | `getValue()` Get the key store as a buffer
    `int` | `hashCode()`
    `JksOptions` | `setPassword(String password)` Set the password for the key store
    `JksOptions` | `setPath(String path)` Set the path to the key store
    `JksOptions` | `setValue(Buffer value)` Set the key store as a buffer
    `JsonObject` | `toJson()` Convert to JSON

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

      `finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface io.vertx.core.net.KeyCertOptions

      `getKeyManagerFactory, keyManagerMapper`

    - ### Methods inherited from interface io.vertx.core.net.TrustOptions

      `getTrustManagerFactory, trustManagerMapper`

- - ### Constructor Detail

    - #### JksOptions

          public JksOptions()

      Default constructor

    - #### JksOptions

          public JksOptions(JksOptions other)

      Copy constructor
      Parameters:
        `other` - the options to copy

    - #### JksOptions

          public JksOptions(JsonObject json)

      Create options from JSON
      Parameters:
        `json` - the JSON

  - ### Method Detail

    - #### toJson

          public JsonObject toJson()

      Convert to JSON
      Returns:
        the JSON

    - #### getPassword

          public String getPassword()

      Returns:
        the password for the key store

    - #### setPassword

          public JksOptions setPassword(String password)

      Set the password for the key store
      Parameters:
        `password` - the password
      Returns:
        a reference to this, so the API can be used fluently

    - #### getPath

          public String getPath()

      Get the path to the ksy store
      Returns:
        the path

    - #### setPath

          public JksOptions setPath(String path)

      Set the path to the key store
      Parameters:
        `path` - the path
      Returns:
        a reference to this, so the API can be used fluently

    - #### getValue

          public Buffer getValue()

      Get the key store as a buffer
      Returns:
        the key store as a buffer

    - #### setValue

          public JksOptions setValue(Buffer value)

      Set the key store as a buffer
      Parameters:
        `value` - the key store as a buffer
      Returns:
        a reference to this, so the API can be used fluently

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### copy

          public JksOptions copy()

      Specified by:
        `copy` in interface `KeyCertOptions`
      Specified by:
        `copy` in interface `TrustOptions`
      Returns:
        a copy of these options

    - #### clone

          public JksOptions clone()

      Specified by:
        `clone` in interface `KeyCertOptions`
      Specified by:
        `clone` in interface `TrustOptions`
      Overrides:
        `clone` in class `Object`
      Returns:
        a copy of these options

Copyright © 2019 Eclipse. All rights reserved.