Class StorageImpl

java.lang.Object
io.webfolder.cdp.command.StorageImpl
All Implemented Interfaces:
Storage

public class StorageImpl
extends java.lang.Object
implements Storage
  • Constructor Summary

    Constructors 
    Constructor Description
    StorageImpl​(SessionInvocationHandler handler)  
  • Method Summary

    Modifier and Type Method Description
    void clearCookies()
    Clears cookies.
    void clearCookies​(java.lang.String browserContextId)
    Clears cookies.
    void clearDataForOrigin​(java.lang.String origin, java.lang.String storageTypes)
    Clears storage for origin.
    java.util.List<Cookie> getCookies()
    Returns all browser cookies.
    java.util.List<Cookie> getCookies​(java.lang.String browserContextId)
    Returns all browser cookies.
    GetUsageAndQuotaResult getUsageAndQuota​(java.lang.String origin)
    Returns usage and quota in bytes.
    void setCookies​(java.util.List<CookieParam> cookies)
    Sets given cookies.
    void setCookies​(java.util.List<CookieParam> cookies, java.lang.String browserContextId)
    Sets given cookies.
    void trackCacheStorageForOrigin​(java.lang.String origin)
    Registers origin to be notified when an update occurs to its cache storage list.
    void trackIndexedDBForOrigin​(java.lang.String origin)
    Registers origin to be notified when an update occurs to its IndexedDB.
    void untrackCacheStorageForOrigin​(java.lang.String origin)
    Unregisters origin from receiving notifications for cache storage.
    void untrackIndexedDBForOrigin​(java.lang.String origin)
    Unregisters origin from receiving notifications for IndexedDB.

    Methods inherited from class java.lang.Object

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

  • Method Details

    • clearDataForOrigin

      public void clearDataForOrigin​(java.lang.String origin, java.lang.String storageTypes)
      Description copied from interface: Storage
      Clears storage for origin.
      Specified by:
      clearDataForOrigin in interface Storage
      Parameters:
      origin - Security origin.
      storageTypes - Comma separated list of StorageType to clear.
    • getCookies

      public java.util.List<Cookie> getCookies​(java.lang.String browserContextId)
      Description copied from interface: Storage
      Returns all browser cookies.
      Specified by:
      getCookies in interface Storage
      Parameters:
      browserContextId - Browser context to use when called on the browser endpoint.
      Returns:
      Array of cookie objects.
    • setCookies

      public void setCookies​(java.util.List<CookieParam> cookies, java.lang.String browserContextId)
      Description copied from interface: Storage
      Sets given cookies.
      Specified by:
      setCookies in interface Storage
      Parameters:
      cookies - Cookies to be set.
      browserContextId - Browser context to use when called on the browser endpoint.
    • clearCookies

      public void clearCookies​(java.lang.String browserContextId)
      Description copied from interface: Storage
      Clears cookies.
      Specified by:
      clearCookies in interface Storage
      Parameters:
      browserContextId - Browser context to use when called on the browser endpoint.
    • getUsageAndQuota

      public GetUsageAndQuotaResult getUsageAndQuota​(java.lang.String origin)
      Description copied from interface: Storage
      Returns usage and quota in bytes.
      Specified by:
      getUsageAndQuota in interface Storage
      Parameters:
      origin - Security origin.
      Returns:
      GetUsageAndQuotaResult
    • trackCacheStorageForOrigin

      public void trackCacheStorageForOrigin​(java.lang.String origin)
      Description copied from interface: Storage
      Registers origin to be notified when an update occurs to its cache storage list.
      Specified by:
      trackCacheStorageForOrigin in interface Storage
      Parameters:
      origin - Security origin.
    • trackIndexedDBForOrigin

      public void trackIndexedDBForOrigin​(java.lang.String origin)
      Description copied from interface: Storage
      Registers origin to be notified when an update occurs to its IndexedDB.
      Specified by:
      trackIndexedDBForOrigin in interface Storage
      Parameters:
      origin - Security origin.
    • untrackCacheStorageForOrigin

      public void untrackCacheStorageForOrigin​(java.lang.String origin)
      Description copied from interface: Storage
      Unregisters origin from receiving notifications for cache storage.
      Specified by:
      untrackCacheStorageForOrigin in interface Storage
      Parameters:
      origin - Security origin.
    • untrackIndexedDBForOrigin

      public void untrackIndexedDBForOrigin​(java.lang.String origin)
      Description copied from interface: Storage
      Unregisters origin from receiving notifications for IndexedDB.
      Specified by:
      untrackIndexedDBForOrigin in interface Storage
      Parameters:
      origin - Security origin.
    • getCookies

      public java.util.List<Cookie> getCookies()
      Description copied from interface: Storage
      Returns all browser cookies.
      Specified by:
      getCookies in interface Storage
      Returns:
      Array of cookie objects.
    • setCookies

      public void setCookies​(java.util.List<CookieParam> cookies)
      Description copied from interface: Storage
      Sets given cookies.
      Specified by:
      setCookies in interface Storage
      Parameters:
      cookies - Cookies to be set.
    • clearCookies

      public void clearCookies()
      Description copied from interface: Storage
      Clears cookies.
      Specified by:
      clearCookies in interface Storage