Package org.htmlunit
Class StorageHolder
- java.lang.Object
-
- org.htmlunit.StorageHolder
-
- All Implemented Interfaces:
java.io.Serializable
public class StorageHolder extends java.lang.Object implements java.io.Serializable
Holder for different types of storages.Experimental API: May be changed in next release!
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
StorageHolder.Type
Type for Storage.
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>>
localStorage_
private java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>>
sessionStorage_
-
Constructor Summary
Constructors Constructor Description StorageHolder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,java.lang.String>
getLocalStorage(java.net.URL url)
Gets the local storage (map).java.util.Map<java.lang.String,java.lang.String>
getSessionStorage(WebWindow webWindow)
Gets the local storage (map).java.util.Map<java.lang.String,java.lang.String>
getStore(StorageHolder.Type storageType, Page page)
Gets the store of the give type for the page.private void
readObject(java.io.ObjectInputStream ois)
-
-
-
Method Detail
-
getStore
public java.util.Map<java.lang.String,java.lang.String> getStore(StorageHolder.Type storageType, Page page)
Gets the store of the give type for the page.- Parameters:
storageType
- the typepage
- the page- Returns:
- the store
-
getLocalStorage
public java.util.Map<java.lang.String,java.lang.String> getLocalStorage(java.net.URL url)
Gets the local storage (map).- Parameters:
url
- the page origin- Returns:
- the store
-
getSessionStorage
public java.util.Map<java.lang.String,java.lang.String> getSessionStorage(WebWindow webWindow)
Gets the local storage (map).- Parameters:
webWindow
- the window- Returns:
- the store
-
readObject
private void readObject(java.io.ObjectInputStream ois) throws java.lang.ClassNotFoundException, java.io.IOException
- Throws:
java.lang.ClassNotFoundException
java.io.IOException
-
-