Methods Summary |
---|
private static synchronized java.util.LinkedList | getHandlers()
if(mHandlerList == null)
mHandlerList = new LinkedList<UrlInterceptHandler>();
return mHandlerList;
|
public static synchronized android.webkit.PluginData | getPluginData(java.lang.String url, java.util.Map headers)Given an url, returns the PluginData of the first
UrlInterceptHandler interested, or null if none are or if
intercepts are disabled.
if (urlInterceptDisabled()) {
return null;
}
Iterator iter = getHandlers().listIterator();
while (iter.hasNext()) {
UrlInterceptHandler handler = (UrlInterceptHandler) iter.next();
PluginData data = handler.getPluginData(url, headers);
if (data != null) {
return data;
}
}
return null;
|
public static synchronized android.webkit.CacheManager.CacheResult | getSurrogate(java.lang.String url, java.util.Map headers)Given an url, returns the CacheResult of the first
UrlInterceptHandler interested, or null if none are.
if (urlInterceptDisabled()) {
return null;
}
Iterator iter = getHandlers().listIterator();
while (iter.hasNext()) {
UrlInterceptHandler handler = (UrlInterceptHandler) iter.next();
CacheResult result = handler.service(url, headers);
if (result != null) {
return result;
}
}
return null;
|
public static synchronized boolean | registerHandler(android.webkit.UrlInterceptHandler handler)Register a new UrlInterceptHandler. This handler will be called
before any that were previously registered.
if (!getHandlers().contains(handler)) {
getHandlers().addFirst(handler);
return true;
} else {
return false;
}
|
public static synchronized void | setUrlInterceptDisabled(boolean disabled)set the flag to control whether url intercept is enabled or disabled
mDisabled = disabled;
|
public static synchronized boolean | unregisterHandler(android.webkit.UrlInterceptHandler handler)Unregister a previously registered UrlInterceptHandler.
return getHandlers().remove(handler);
|
public static synchronized boolean | urlInterceptDisabled()get the state of the url intercept, enabled or disabled
return mDisabled;
|