Package moe.kyokobot.libdave
Class CommitResult
java.lang.Object
moe.kyokobot.libdave.CommitResult
Represents the result of processing an MLS commit via
Session.processCommit(byte[]).
This class encapsulates the status of the operation (success, failure, ignored) and, in case of success, the changes to the group roster (added, updated, or removed keys).
-
Method Summary
Modifier and TypeMethodDescriptionstatic CommitResultfailed()@NotNull RosterMapRetrieves the roster map detailing key changes resulting from the commit.static CommitResultignored()booleanisFailed()Checks if the commit processing failed.booleanChecks if the commit was ignored (e.g., duplicate or irrelevant).static CommitResult
-
Method Details
-
failed
-
ignored
-
success
-
isFailed
public boolean isFailed()Checks if the commit processing failed.- Returns:
trueif the operation failed,falseotherwise.
-
isIgnored
public boolean isIgnored()Checks if the commit was ignored (e.g., duplicate or irrelevant).- Returns:
trueif the commit was ignored,falseotherwise.
-
getRosterMap
Retrieves the roster map detailing key changes resulting from the commit.The map keys are user IDs. The values are the new key data, or null/empty if the user's key was removed.
- Returns:
- The
RosterMapwith the changes. - Throws:
IllegalStateException- if the result is failed or ignored.
-