Class DefaultProxyStore

  • All Implemented Interfaces:
    ProxyStore

    public class DefaultProxyStore
    extends java.lang.Object
    implements ProxyStore
    An in-memory ProxyStore store that can encode its state as a JSON object literal.
    • Constructor Detail

      • DefaultProxyStore

        public DefaultProxyStore()
        Construct an empty DefaultProxyStore.
      • DefaultProxyStore

        public DefaultProxyStore​(java.lang.String payload)
                          throws java.lang.IllegalArgumentException
        Construct a DefaultProxyStore using the a value returned from encode().
        Parameters:
        payload - a String previously returned from encode()
        Throws:
        java.lang.IllegalArgumentException - if the payload cannot be parsed
    • Method Detail

      • encode

        public java.lang.String encode()
        Return a JSON object literal with the contents of the store.
      • nextId

        public int nextId()
        Description copied from interface: ProxyStore
        Returns a non-negative sequence number. The actual sequence of values returned by this method is unimportant, as long as the numbers in the sequence are unique.
        Specified by:
        nextId in interface ProxyStore