Serializable, Comparable<SSLEngineResult.HandshakeStatus>public static enum SSLEngineResult.HandshakeStatus extends Enum<SSLEngineResult.HandshakeStatus>
SSLEngineResult enum describing the current
handshaking state of this SSLEngine.| 枚举常量 | 说明 |
|---|---|
FINISHED |
The
SSLEngine has just finished handshaking. |
NEED_TASK |
The
SSLEngine needs the results of one (or more)
delegated tasks before handshaking can continue. |
NEED_UNWRAP |
The
SSLEngine needs to receive data from the
remote side before handshaking can continue. |
NEED_WRAP |
The
SSLEngine must send data to the remote side
before handshaking can continue, so SSLEngine.wrap()
should be called. |
NOT_HANDSHAKING |
The
SSLEngine is not currently handshaking. |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
static SSLEngineResult.HandshakeStatus |
valueOf(String name) |
返回带有指定名称的该类型的枚举常量。
字符串必须与用于声明该类型的枚举常量的
标识符完全匹配。(不允许有多余
的空格字符。)
|
static SSLEngineResult.HandshakeStatus[] |
values() |
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。该方法可用于迭代
常量, 如下所示:
for (SSLEngineResult.HandshakeStatus c : SSLEngineResult.HandshakeStatus.values()) System.out.println(c); |
public static final SSLEngineResult.HandshakeStatus NOT_HANDSHAKING
SSLEngine is not currently handshaking.public static final SSLEngineResult.HandshakeStatus FINISHED
SSLEngine has just finished handshaking.
This value is only generated by a call to
SSLEngine.wrap()/unwrap() when that call
finishes a handshake. It is never generated by
SSLEngine.getHandshakeStatus().
public static final SSLEngineResult.HandshakeStatus NEED_TASK
SSLEngine needs the results of one (or more)
delegated tasks before handshaking can continue.public static final SSLEngineResult.HandshakeStatus NEED_WRAP
SSLEngine must send data to the remote side
before handshaking can continue, so SSLEngine.wrap()
should be called.public static final SSLEngineResult.HandshakeStatus NEED_UNWRAP
SSLEngine needs to receive data from the
remote side before handshaking can continue.public static SSLEngineResult.HandshakeStatus[] values()
for (SSLEngineResult.HandshakeStatus c : SSLEngineResult.HandshakeStatus.values()) System.out.println(c);
public static SSLEngineResult.HandshakeStatus valueOf(String name)
name - 要返回的枚举常量的名称。IllegalArgumentException - 如果该枚举类型没有带有指定名称的常量NullPointerException - 如果参数为空值