Interface SnapshotTokenHandler
-
public interface SnapshotTokenHandlerResponsible for the validation, generation and parsing of snapshot tokens used for keying a snapshot of some state.- Since:
- 0.1.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Stringgenerate(org.forgerock.json.JsonValue state)Generates a new snapshot token using the state.voidvalidate(String snapshotToken)Validates the passed snapshot token.org.forgerock.json.JsonValuevalidateAndExtractState(String snapshotToken)Validates and parses the token, extracting any encapsulated state.
-
-
-
Method Detail
-
generate
String generate(org.forgerock.json.JsonValue state) throws org.forgerock.json.resource.ResourceException
Generates a new snapshot token using the state.- Parameters:
state- the state- Returns:
- snapshot token
- Throws:
org.forgerock.json.resource.ResourceException- thrown should some issue occur creating the snapshot token
-
validate
void validate(String snapshotToken) throws org.forgerock.json.resource.ResourceException
Validates the passed snapshot token.- Parameters:
snapshotToken- the snapshot token to be validated- Throws:
org.forgerock.json.resource.ResourceException- thrown should some issue be found with the token
-
validateAndExtractState
org.forgerock.json.JsonValue validateAndExtractState(String snapshotToken) throws org.forgerock.json.resource.ResourceException
Validates and parses the token, extracting any encapsulated state.- Parameters:
snapshotToken- the snapshot token to be validated and parsed- Returns:
- the state
- Throws:
org.forgerock.json.resource.ResourceException- thrown should some issue be found with the token
-
-