public final class

UrlInterceptRegistry

extends Object
java.lang.Object
   ↳ android.webkit.UrlInterceptRegistry

Summary

Public Constructors
UrlInterceptRegistry()
Public Methods
synchronized static PluginData getPluginData(String url, Map<StringString> headers)
Given an url, returns the PluginData of the first UrlInterceptHandler interested, or null if none are or if intercepts are disabled.
synchronized static CacheManager.CacheResult getSurrogate(String url, Map<StringString> headers)
Given an url, returns the CacheResult of the first UrlInterceptHandler interested, or null if none are.
synchronized static boolean registerHandler(UrlInterceptHandler handler)
Register a new UrlInterceptHandler.
synchronized static void setUrlInterceptDisabled(boolean disabled)
set the flag to control whether url intercept is enabled or disabled
synchronized static boolean unregisterHandler(UrlInterceptHandler handler)
Unregister a previously registered UrlInterceptHandler.
synchronized static boolean urlInterceptDisabled()
get the state of the url intercept, enabled or disabled
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public UrlInterceptRegistry ()

Public Methods

public static synchronized PluginData getPluginData (String url, Map<StringString> headers)

Given an url, returns the PluginData of the first UrlInterceptHandler interested, or null if none are or if intercepts are disabled.

Returns
  • A PluginData instance containing surrogate content.

public static synchronized CacheManager.CacheResult getSurrogate (String url, Map<StringString> headers)

Given an url, returns the CacheResult of the first UrlInterceptHandler interested, or null if none are.

Returns
  • A CacheResult containing surrogate content.

public static synchronized boolean registerHandler (UrlInterceptHandler handler)

Register a new UrlInterceptHandler. This handler will be called before any that were previously registered.

Parameters
handler The new UrlInterceptHandler object
Returns
  • true if the handler was not previously registered.

public static synchronized void setUrlInterceptDisabled (boolean disabled)

set the flag to control whether url intercept is enabled or disabled

Parameters
disabled true to disable the cache

public static synchronized boolean unregisterHandler (UrlInterceptHandler handler)

Unregister a previously registered UrlInterceptHandler.

Parameters
handler A previously registered UrlInterceptHandler.
Returns
  • true if the handler was found and removed from the list.

public static synchronized boolean urlInterceptDisabled ()

get the state of the url intercept, enabled or disabled

Returns
  • return if it is disabled