|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.directwebremoting.datasync.AbstractPerXStoreProvider<T>
public abstract class AbstractPerXStoreProvider<T>
A raw StoreProvider works on a global basis, so all users share the same data. We envisage a number of ways to sub-divide this. For example, one store per HttpSession, one store per ScriptSession, etc. (The PerX versions of the StoreProvider class). This provides an abstract implementation of the PerX behavior.
| Constructor Summary | |
|---|---|
AbstractPerXStoreProvider()
|
|
| Method Summary | |
|---|---|
void |
put(java.lang.String itemId,
RawData rawData)
Similar to Map.put(K, V) in adding items to a Store. |
void |
put(java.lang.String itemId,
T value)
Similar to Map.put(K, V) in adding items to a Store. |
void |
unsubscribe(StoreChangeListener<T> listener)
Remove the declaration of interest previously expressed. |
void |
update(java.util.List<ItemUpdate> changes)
Make a series of updates to items in the store. |
Item |
viewItem(java.lang.String itemId)
Similar to Map.get(java.lang.Object) in fetching items from a Store. |
Item |
viewItem(java.lang.String itemId,
StoreChangeListener<T> listener)
Similar to Map.get(java.lang.Object) in fetching items from a Store, and
request to stay updated to changes in the region. |
MatchedItems |
viewRegion(StoreRegion region)
Extract the data referred to by the given region. |
MatchedItems |
viewRegion(StoreRegion region,
StoreChangeListener<T> listener)
Extract the data referred to by the given region, and request to stay updated to changes in the region. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractPerXStoreProvider()
| Method Detail |
|---|
public void put(java.lang.String itemId,
RawData rawData)
StoreProviderMap.put(K, V) in adding items to a Store.
A value of null is equivalent to removing the item from the store.
Part of the function of put is to convert the data stored in
RawData into alterations to data in the store. This boiler plate
code is implemented in AbstractStoreProvider.
See notes on Item.getItemId()
put in interface StoreProvider<T>itemId - The key (or some mapping) to it.rawData - Data from the web to be converted and added to the store
public void put(java.lang.String itemId,
T value)
StoreProviderMap.put(K, V) in adding items to a Store.
A value of null is equivalent to removing the item from the store.
put in interface StoreProvider<T>itemId - The key (or some mapping) to it.value - The new object to be added to the storepublic void unsubscribe(StoreChangeListener<T> listener)
StoreProvider
unsubscribe in interface StoreProvider<T>listener - The listener that should no longer be notifiedpublic void update(java.util.List<ItemUpdate> changes)
StoreProvider
update in interface StoreProvider<T>changes - A list of item IDs along with the attributes to change
and the values to change topublic Item viewItem(java.lang.String itemId)
StoreProviderMap.get(java.lang.Object) in fetching items from a Store.
viewItem in interface StoreProvider<T>itemId - The ID of the item to fetch
public Item viewItem(java.lang.String itemId,
StoreChangeListener<T> listener)
StoreProviderMap.get(java.lang.Object) in fetching items from a Store, and
request to stay updated to changes in the region.
viewItem in interface StoreProvider<T>itemId - The ID of the item to fetchlistener - The listener to be notified of changes
public MatchedItems viewRegion(StoreRegion region)
StoreProvider
viewRegion in interface StoreProvider<T>region - A set of filter and sort criteria to restrict the fetched data
public MatchedItems viewRegion(StoreRegion region,
StoreChangeListener<T> listener)
StoreProvider
viewRegion in interface StoreProvider<T>region - A set of filter and sort criteria to restrict the fetched datalistener - The listener to be notified of changes
|
Copyright ยจ 2008 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||