com.sencha.gxt.data.shared.loader
Class MemoryProxy<C,D>

java.lang.Object
  extended by com.sencha.gxt.data.shared.loader.MemoryProxy<C,D>
All Implemented Interfaces:
DataProxy<C,D>

public class MemoryProxy<C,D>
extends java.lang.Object
implements DataProxy<C,D>

A DataProxy implementation that simply passes the data specified in the constructor to the reader when its load method is called.


Constructor Summary
MemoryProxy(D data)
          Creates new memory proxy.
 
Method Summary
 D getData()
          Returns the proxy data.
 void load(C loadConfig, Callback<D,java.lang.Throwable> callback)
          Data should be retrieved using the specified load config.
 void setData(D data)
          Sets the proxy data.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MemoryProxy

public MemoryProxy(D data)
Creates new memory proxy.

Parameters:
data - the local data
Method Detail

getData

public D getData()
Returns the proxy data.

Returns:
the data

load

public void load(C loadConfig,
                 Callback<D,java.lang.Throwable> callback)
Description copied from interface: DataProxy
Data should be retrieved using the specified load config. When specified, the DataReader can be used to "process" the raw data.

Specified by:
load in interface DataProxy<C,D>
Parameters:
loadConfig - the load config object to be passed to server
callback - the data callback

setData

public void setData(D data)
Sets the proxy data.

Parameters:
data - the data


Copyright © 2012. All Rights Reserved.