Enum Class InMemorySessionService.DuplicateSessionIdBehavior
java.lang.Object
java.lang.Enum<InMemorySessionService.DuplicateSessionIdBehavior>
com.google.adk.sessions.InMemorySessionService.DuplicateSessionIdBehavior
- All Implemented Interfaces:
Serializable, Comparable<InMemorySessionService.DuplicateSessionIdBehavior>, Constable
- Enclosing class:
InMemorySessionService
public static enum InMemorySessionService.DuplicateSessionIdBehavior
extends Enum<InMemorySessionService.DuplicateSessionIdBehavior>
什么
createSession 当……时,它会做…… sessionId 该名称已被其他人使用(或:该名称已被占用,因此无法被再次使用)。-
嵌套类概述
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
枚举常量概述
Enum Constants -
方法概述
Modifier and TypeMethodDescription返回该类中具有指定名称的枚举常量。values()返回一个数组,其中包含该枚举类中的所有常量,并按照它们被声明的顺序排列。
-
枚举常量详细信息
-
OVERWRITE
Deprecated.Construct the service withREJECTinstead, which becomes the default in a future release.会替换已存储的会话数据,同时丢弃该会话的所有事件和状态信息。 -
REJECT
拒绝该呼叫,并执行以下操作:SessionException. 在未来的版本中,它将成为默认设置。
-
-
方法详细信息(Method Details)
-
values
返回一个数组,其中包含该枚举类中的所有常量,并按照它们被声明的顺序排列。- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
返回该类中具有指定名称的枚举常量。 该字符串必须与指定的名称完全匹配。 确切地;准确地 这是一个用于在该类中声明枚举常量的标识符。(不允许使用多余的空白字符。)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
REJECT相反,这种方式将成为未来版本的默认设置。