public enum SslMode extends Enum<SslMode>
| 列挙型定数と説明 |
|---|
DISABLED
Establish an unencrypted connection.
|
PREFERRED
Establish an encrypted connection if the server supports encrypted connections, otherwise fallback to an unencrypted connection.
|
REQUIRED
Establish an encrypted connection if the server supports encrypted connections, otherwise the connection fails.
|
VERIFY_CA
Establish an encrypted connection based on
REQUIRED with verify the server Certificate Authority (CA) certificates. |
VERIFY_IDENTITY
Establish an encrypted connection based on
VERIFY_CA, additionally perform identity verification by checking the hostname. |
| 修飾子とタイプ | メソッドと説明 |
|---|---|
boolean |
requireSsl() |
boolean |
startSsl() |
static SslMode |
valueOf(String name)
指定した名前を持つこの型の列挙型定数を返します。
|
static SslMode[] |
values()
この列挙型の定数を含む配列を宣言されている順序で返します。
|
boolean |
verifyCertificate() |
boolean |
verifyIdentity() |
public static final SslMode DISABLED
In other words: I don't care about security and don't want to pay the overhead for encryption.
public static final SslMode PREFERRED
In other words: I don't care about encryption but will pay the overhead of encryption if the server supports it.
public static final SslMode REQUIRED
In other words: I want my data to be encrypted, and I accept the overhead. I trust that the network will make sure I always connect to the server I want.
public static final SslMode VERIFY_CA
REQUIRED with verify the server Certificate Authority (CA) certificates.
The connection attempt fails if CA certificates mismatched.
In other words: I want my data encrypted, and I accept the overhead. I want to be sure that I connect to a server that I trust.
public static final SslMode VERIFY_IDENTITY
VERIFY_CA, additionally perform identity verification by checking the hostname.
The connection attempt fails if the identity mismatched.
In other words: I want my data encrypted, and I accept the overhead. I want to be sure that I connect to a server I trust, and that it's the one I specify.
public static SslMode[] values()
for(SslMode c: SslMode.values()) System.out.println(c);
public static SslMode valueOf(String name)
name - 返される列挙型定数の名前。IllegalArgumentException - この列挙型に、指定した名前の定数がない場合NullPointerException - 引数がnullの場合public final boolean requireSsl()
public final boolean startSsl()
public final boolean verifyCertificate()
public final boolean verifyIdentity()
Copyright © 2018–2020. All rights reserved.