public class

DefaultProxyStore

extends Object
implements ProxyStore
java.lang.Object
   ↳ com.google.gwt.requestfactory.shared.DefaultProxyStore

Class Overview

An in-memory ProxyStore store that can encode its state as a JSON object literal.

Summary

Public Constructors
DefaultProxyStore()
Construct an empty DefaultProxyStore.
DefaultProxyStore(String payload)
Construct a DefaultProxyStore using the a value returned from encode().
Public Methods
String encode()
Return a JSON object literal with the contents of the store.
Splittable get(String key)
Called by ProxySerializer to retrieve a value previously provided to put(String, Splittable).
int nextId()
Returns a non-negative sequence number.
void put(String key, Splittable value)
Called by ProxySerializer to store a value.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.google.gwt.requestfactory.shared.ProxyStore

Public Constructors

public DefaultProxyStore ()

Construct an empty DefaultProxyStore.

public DefaultProxyStore (String payload)

Construct a DefaultProxyStore using the a value returned from encode().

Parameters
payload a String previously returned from encode()
Throws
IllegalArgumentException if the payload cannot be parsed

Public Methods

public String encode ()

Return a JSON object literal with the contents of the store.

public Splittable get (String key)

Called by ProxySerializer to retrieve a value previously provided to put(String, Splittable).

Parameters
key the key
Returns
  • the associated value or null if key is unknown

public int nextId ()

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.

public void put (String key, Splittable value)

Called by ProxySerializer to store a value.

Parameters
key a key value that will be passed to get(String)
value the data to store