public enum Protocol extends Enum<Protocol>
Communication over HTTPS is the default, and is more secure than HTTP, which is why YOP recommends using HTTPS. HTTPS connections can use more system resources because of the extra work to encrypt network traffic, so the option to use HTTP is available in case users need it.
| 枚举常量和说明 |
|---|
HTTP
HTTP Protocol - Using the HTTP protocol is less secure than HTTPS, but can slightly reduce the system resources
used when communicating with YOP.
|
HTTPS
HTTPS Protocol - Using the HTTPS protocol is more secure than using the HTTP protocol, but may use slightly more
system resources.
|
| 限定符和类型 | 方法和说明 |
|---|---|
int |
getDefaultPort() |
String |
toString() |
static Protocol |
valueOf(String name)
返回带有指定名称的该类型的枚举常量。
|
static Protocol[] |
values()
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
|
public static final Protocol HTTP
public static final Protocol HTTPS
public static Protocol[] values()
for (Protocol c : Protocol.values()) System.out.println(c);
public static Protocol valueOf(String name)
name - 要返回的枚举常量的名称。IllegalArgumentException - 如果该枚举类型没有带有指定名称的常量NullPointerException - 如果参数为空值public int getDefaultPort()
Copyright © 2024. All rights reserved.