Usage Notes
Defining this functionality as an SPI has two use cases:
-
first, (though some browsers support longer strings), there is a limit of 2083 characters for URLs. For view model mementos that correspond to large strings (as might occur when serializing a JAXB @XmlRootElement-annotated view model), the service provides a hook.
For example, each memento string could be mapped to a GUID held in some cluster-aware cache.
-
the service provides the ability, to encrypt the string in order to avoid leakage of potentially sensitive state within the URL.
For large view models, there’s the possibility that the 2083 character limit could be exceeded; in such cases register an alternative implementation of this service.