Android
android.webkit
public final class

android.webkit.UrlInterceptRegistry

java.lang.Object
android.webkit.UrlInterceptRegistry

Summary

Public Constructors

            UrlInterceptRegistry()

Public Methods

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

Details

Public Constructors

public UrlInterceptRegistry()

Public Methods

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
Copyright 2007 Google Inc. Build 0.9_r1-98467 - 14 Aug 2008 18:48