of

fun of(value: String?): SslMode

Parses a mode from its URL spelling, accepting the enum name as well.

A stated mode that matches nothing is refused rather than resolved to a default.

Return

The matching mode, or PREFER when value is null.

Parameters

value

disable, prefer, require, verify-ca, verify-full, or the equivalent enum name; case-insensitive. null means the mode was not stated at all.

Throws

INVALID_ARGUMENT if value is stated but unrecognized.