Build 1.0_r1(from source)

android.webkit
Class UrlInterceptRegistry

java.lang.Object
  extended by android.webkit.UrlInterceptRegistry

public final class UrlInterceptRegistry
extends Object


Constructor Summary
UrlInterceptRegistry()
           
 
Method Summary
static CacheManager.CacheResult getSurrogate(String url, Map<String,String> headers)
          Given an url, returns the CacheResult of the first UrlInterceptHandler interested, or null if none are.
static boolean registerHandler(UrlInterceptHandler handler)
          Register a new UrlInterceptHandler.
static void setUrlInterceptDisabled(boolean disabled)
          set the flag to control whether url intercept is enabled or disabled
static boolean unregisterHandler(UrlInterceptHandler handler)
          Unregister a previously registered UrlInterceptHandler.
static boolean urlInterceptDisabled()
          get the state of the url intercept, enabled or disabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UrlInterceptRegistry

public UrlInterceptRegistry()
Method Detail

setUrlInterceptDisabled

public static void setUrlInterceptDisabled(boolean disabled)
set the flag to control whether url intercept is enabled or disabled

Parameters:
disabled - true to disable the cache

urlInterceptDisabled

public static boolean urlInterceptDisabled()
get the state of the url intercept, enabled or disabled

Returns:
return if it is disabled

registerHandler

public static 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.

unregisterHandler

public static 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.

getSurrogate

public static CacheManager.CacheResult getSurrogate(String url,
                                                    Map<String,String> headers)
Given an url, returns the CacheResult of the first UrlInterceptHandler interested, or null if none are.

Returns:
A CacheResult containing surrogate content.

Build 1.0_r1(from source)

Please submit a feedback, bug or feature