Top Description Constructors Methods
io.vertx.core.net

public Class KeyStoreOptions

extends KeyStoreOptionsBase
Class Inheritance
Annotations
@DataObject
@JsonGen
publicConverter:false
Imports
io.vertx.codegen.annotations.DataObject, io.vertx.codegen.json.annotations.JsonGen, io.vertx.core.buffer.Buffer, io.vertx.core.json.JsonObject

Key or trust store options configuring private key and/or certificates based on KeyStore.

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

HttpServerOptions options = HttpServerOptions.httpServerOptions();
options.setKeyCertOptions(new KeyStoreOptions().setType("JKS").setPath("/mykeystore.jks").setPassword("foo"));
Or directly provided as a buffer:
Buffer store = vertx.fileSystem().readFileBlocking("/mykeystore.jks");
options.setKeyCertOptions(new KeyStoreOptions().setType("JKS").setValue(store).setPassword("foo"));

You can also use specific subclasses JksOptions or PfxOptions that will set the setType for you:

HttpServerOptions options = HttpServerOptions.httpServerOptions();
options.setKeyCertOptions(new JksOptions().setPath("/mykeystore.jks").setPassword("foo"));
Authors
Julien Viet, Tim Fox

Constructor Summary

AccessConstructor and Description
public
KeyStoreOptions()

Default constructor

public
KeyStoreOptions(KeyStoreOptions
the options to copy
other
)

Copy constructor

public
KeyStoreOptions(JsonObject
the JSON
json
)
References Deprecated JsonObject is deprecated or references (maybe indirectly) at least one deprecated element.

Create options from JSON

Method Summary

Modifier and TypeMethod and Description
public KeyStoreOptions
public String

Returns:

the store provider
getProvider
()

Overrides io.vertx.core.net.KeyStoreOptionsBase.getProvider.

public String

Returns:

the store type
getType
()

Overrides io.vertx.core.net.KeyStoreOptionsBase.getType.

public KeyStoreOptions
setAlias(String alias)

Overrides io.vertx.core.net.KeyStoreOptionsBase.setAlias.

Set the alias for a server certificate when the keystore has more than one.

public KeyStoreOptions
setAliasPassword(String aliasPassword)

Overrides io.vertx.core.net.KeyStoreOptionsBase.setAliasPassword.

Set the password for the server certificate designated by getAlias().

public KeyStoreOptions
setPassword(String
the password
password
)

Overrides io.vertx.core.net.KeyStoreOptionsBase.setPassword.

Set the password for the key store

public KeyStoreOptions
setPath(String
the path
path
)

Overrides io.vertx.core.net.KeyStoreOptionsBase.setPath.

Set the path to the key store

public KeyStoreOptions

Returns:

a reference to this, so the API can be used fluently
setProvider
(String
the type
provider
)

Overrides io.vertx.core.net.KeyStoreOptionsBase.setProvider.

Set the store provider.

public KeyStoreOptions

Returns:

a reference to this, so the API can be used fluently
setType
(String
the type
type
)

Overrides io.vertx.core.net.KeyStoreOptionsBase.setType.

Set the store type.

public KeyStoreOptions
setValue(Buffer
the key store as a buffer
value
)

Overrides io.vertx.core.net.KeyStoreOptionsBase.setValue.

References Deprecated Buffer is deprecated or references (maybe indirectly) at least one deprecated element.

Set the key store as a buffer

public JsonObject

Returns:

the JSON
toJson
()
References Deprecated JsonObject is deprecated or references (maybe indirectly) at least one deprecated element.

Convert to JSON

Inherited from io.vertx.core.net.KeyStoreOptionsBase:
equalsgetAliasgetAliasPasswordgetHelpergetKeyManagerFactorygetPasswordgetPathgetTrustManagerFactorygetValuekeyManagerFactoryMapperkeyManagerMapperloadKeyStoretrustManagerMapper

Constructor Detail

KeyStoreOptionsback to summary
public KeyStoreOptions()

Default constructor

KeyStoreOptionsback to summary
public KeyStoreOptions(KeyStoreOptions other)

Copy constructor

Parameters
other:KeyStoreOptions

the options to copy

KeyStoreOptionsback to summary
public KeyStoreOptions(JsonObject json)

References Deprecated

JsonObject is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Create options from JSON

Parameters
json:JsonObject

the JSON

Method Detail

copyback to summary
public KeyStoreOptions copy()

Implements abstract io.vertx.core.net.KeyStoreOptionsBase.copy.

Implements io.vertx.core.net.KeyCertOptions.copy, io.vertx.core.net.TrustOptions.copy.

Returns:KeyStoreOptions

Doc from io.vertx.core.net.KeyCertOptions.copy.

a copy of these options

Annotations
@Override
getProviderback to summary
public String getProvider()

Overrides io.vertx.core.net.KeyStoreOptionsBase.getProvider.

Returns:String

the store provider

getTypeback to summary
public String getType()

Overrides io.vertx.core.net.KeyStoreOptionsBase.getType.

Returns:String

the store type

setAliasback to summary
public KeyStoreOptions setAlias(String alias)

Overrides io.vertx.core.net.KeyStoreOptionsBase.setAlias.

Doc from io.vertx.core.net.KeyStoreOptionsBase.setAlias.

Set the alias for a server certificate when the keystore has more than one.

Returns:KeyStoreOptions

a reference to this, so the API can be used fluently

Annotations
@Override
setAliasPasswordback to summary
public KeyStoreOptions setAliasPassword(String aliasPassword)

Overrides io.vertx.core.net.KeyStoreOptionsBase.setAliasPassword.

Doc from io.vertx.core.net.KeyStoreOptionsBase.setAliasPassword.

Set the password for the server certificate designated by getAlias().

Returns:KeyStoreOptions

a reference to this, so the API can be used fluently

Annotations
@Override
setPasswordback to summary
public KeyStoreOptions setPassword(String password)

Overrides io.vertx.core.net.KeyStoreOptionsBase.setPassword.

Doc from io.vertx.core.net.KeyStoreOptionsBase.setPassword.

Set the password for the key store

Parameters
password:String

the password

Returns:KeyStoreOptions

a reference to this, so the API can be used fluently

Annotations
@Override
setPathback to summary
public KeyStoreOptions setPath(String path)

Overrides io.vertx.core.net.KeyStoreOptionsBase.setPath.

Doc from io.vertx.core.net.KeyStoreOptionsBase.setPath.

Set the path to the key store

Parameters
path:String

the path

Returns:KeyStoreOptions

a reference to this, so the API can be used fluently

Annotations
@Override
setProviderback to summary
public KeyStoreOptions setProvider(String provider)

Overrides io.vertx.core.net.KeyStoreOptionsBase.setProvider.

Set the store provider.

Parameters
provider:String

the type

Returns:KeyStoreOptions

a reference to this, so the API can be used fluently

setTypeback to summary
public KeyStoreOptions setType(String type)

Overrides io.vertx.core.net.KeyStoreOptionsBase.setType.

Set the store type.

Parameters
type:String

the type

Returns:KeyStoreOptions

a reference to this, so the API can be used fluently

setValueback to summary
public KeyStoreOptions setValue(Buffer value)

Overrides io.vertx.core.net.KeyStoreOptionsBase.setValue.

Doc from io.vertx.core.net.KeyStoreOptionsBase.setValue.

References Deprecated

Buffer is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Set the key store as a buffer

Parameters
value:Buffer

the key store as a buffer

Returns:KeyStoreOptions

a reference to this, so the API can be used fluently

Annotations
@Override
toJsonback to summary
public JsonObject toJson()

References Deprecated

JsonObject is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Convert to JSON

Returns:JsonObject

the JSON