Serializable, Comparable<ContinuationState>public enum ContinuationState extends Enum<ContinuationState>
Ability that has implemented IAbilityContinuation
and is in a reversible migration process that allows the ability to be migrated back.
The following example describes state changes in a migration process:
The initial state of FooAbility on device A is LOCAL_RUNNING. If it is migrated to
device B in a reversible way, its state on device A becomes REMOTE_RUNNING and that on device
B becomes REPLICA_RUNNING. If it is migrated to device B in a non-reversible way, its states
on both devices are LOCAL_RUNNING.
SystemCapability.Aafwk#ABILITY| 枚举常量 | 说明 |
|---|---|
LOCAL_RUNNING |
Indicates that the ability is running on the local device.
|
REMOTE_RUNNING |
Indicates that the ability has been migrated to another device.
|
REPLICA_RUNNING |
Indicates that the ability was migrated from another device to the current device.
|
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
static ContinuationState |
valueOf(String name) |
返回带有指定名称的该类型的枚举常量。
字符串必须与用于声明该类型的枚举常量的
标识符完全匹配。(不允许有多余
的空格字符。)
|
static ContinuationState[] |
values() |
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。该方法可用于迭代
常量, 如下所示:
for (ContinuationState c : ContinuationState.values()) System.out.println(c); |
public static final ContinuationState LOCAL_RUNNING
public static final ContinuationState REMOTE_RUNNING
public static final ContinuationState REPLICA_RUNNING
public static ContinuationState[] values()
for (ContinuationState c : ContinuationState.values()) System.out.println(c);
public static ContinuationState valueOf(String name)
name - 要返回的枚举常量的名称。IllegalArgumentException - 如果该枚举类型没有带有指定名称的常量NullPointerException - 如果参数为空值