public enum HeartbeatMode extends Enum<HeartbeatMode>
| Enum Constant and Description |
|---|
ALL
请求和响应都得小于保活时间
|
ANY
请求或响应有一个在保活时间内就行
|
LAST_REQ
最后的请求
|
LAST_RESP
最后的响应
|
| Modifier and Type | Method and Description |
|---|---|
abstract long |
getLastTime(ChannelStat stat)
获取最后的时间
|
static HeartbeatMode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static HeartbeatMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final HeartbeatMode LAST_REQ
public static final HeartbeatMode LAST_RESP
public static final HeartbeatMode ANY
public static final HeartbeatMode ALL
public static HeartbeatMode[] values()
for (HeartbeatMode c : HeartbeatMode.values()) System.out.println(c);
public static HeartbeatMode valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic abstract long getLastTime(ChannelStat stat)
stat - ChannelStatCopyright © 2024. All rights reserved.