Package org.htmlunit

Class 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.
    • 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • StorageHolder

        public StorageHolder()
    • 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 type
        page - 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