|
GWT 2.7.0 | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.google.gwt.storage.client.StorageImpl
class StorageImpl
This is the HTML5 Storage implementation according to the standard recommendation.
Never use this class directly, instead use Storage.
| Field Summary | |
|---|---|
protected static JavaScriptObject |
jsHandler
|
static java.lang.String |
LOCAL_STORAGE
|
static java.lang.String |
SESSION_STORAGE
|
protected static java.util.List<StorageEvent.Handler> |
storageEventHandlers
|
| Constructor Summary | |
|---|---|
protected |
StorageImpl()
This class can never be instantiated by itself. |
| Method Summary | |
|---|---|
HandlerRegistration |
addStorageEventHandler(StorageEvent.Handler handler)
Registers an event handler for StorageEvents. |
protected void |
addStorageEventHandler0()
|
void |
clear(java.lang.String storage)
Removes all items in the Storage. |
java.lang.String |
getItem(java.lang.String storage,
java.lang.String key)
Returns the item in the Storage associated with the specified key. |
int |
getLength(java.lang.String storage)
Returns the number of items in this Storage. |
protected java.util.List<StorageEvent.Handler> |
getStorageEventHandlers()
Returns the List of StorageEvent.Handlers
registered, which is never null. |
protected Storage |
getStorageFromEvent(StorageEvent event)
Returns the Storage object that was affected in the event. |
protected static void |
handleStorageEvent(StorageEvent event)
Handles StorageEvents if a StorageEvent.Handler is registered. |
protected static boolean |
hasStorageEventHandlers()
Returns true if at least one StorageEvent handler is
registered, false otherwise. |
java.lang.String |
key(java.lang.String storage,
int index)
Returns the key at the specified index. |
void |
removeItem(java.lang.String storage,
java.lang.String key)
Removes the item in the Storage associated with the specified key. |
void |
removeStorageEventHandler(StorageEvent.Handler handler)
De-registers an event handler for StorageEvents. |
protected void |
removeStorageEventHandler0()
|
void |
setItem(java.lang.String storage,
java.lang.String key,
java.lang.String data)
Sets the value in the Storage associated with the specified key to the specified data. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String LOCAL_STORAGE
public static final java.lang.String SESSION_STORAGE
protected static java.util.List<StorageEvent.Handler> storageEventHandlers
protected static JavaScriptObject jsHandler
| Constructor Detail |
|---|
protected StorageImpl()
| Method Detail |
|---|
protected static final void handleStorageEvent(StorageEvent event)
StorageEvent.Handler is registered.
protected static boolean hasStorageEventHandlers()
true if at least one StorageEvent handler is
registered, false otherwise.
public HandlerRegistration addStorageEventHandler(StorageEvent.Handler handler)
handler -
HandlerRegistration used to remove this handlerpublic void clear(java.lang.String storage)
storage - either LOCAL_STORAGE or SESSION_STORAGE
public java.lang.String getItem(java.lang.String storage,
java.lang.String key)
storage - either LOCAL_STORAGE or SESSION_STORAGEkey - the key to a value in the Storage
public int getLength(java.lang.String storage)
storage - either LOCAL_STORAGE or SESSION_STORAGE
public java.lang.String key(java.lang.String storage,
int index)
storage - either LOCAL_STORAGE or SESSION_STORAGEindex - the index of the key
public void removeItem(java.lang.String storage,
java.lang.String key)
storage - either LOCAL_STORAGE or SESSION_STORAGEkey - the key to a value in the Storagepublic void removeStorageEventHandler(StorageEvent.Handler handler)
handler -
public void setItem(java.lang.String storage,
java.lang.String key,
java.lang.String data)
storage - either LOCAL_STORAGE or SESSION_STORAGEkey - the key to a value in the Storagedata - the value associated with the keyprotected void addStorageEventHandler0()
protected java.util.List<StorageEvent.Handler> getStorageEventHandlers()
List of StorageEvent.Handlers
registered, which is never null.
protected Storage getStorageFromEvent(StorageEvent event)
Storage object that was affected in the event.
Storage object that was affected in the event.protected void removeStorageEventHandler0()
|
GWT 2.7.0 | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||