/** * Registers a Protocol handler by adding it to the handlers map. * If the given protocol handler returns <code>null</code> as it's * supported protocol then it is registered as the default * protocol handler. * @param handler the new Protocol Handler to register */ public static synchronized void registerHandler (ParsedURLProtocolHandler handler) { if (handler.getProtocolHandled() == null) { defaultHandler = handler; return; } Map handlers = getHandlersMap(); handlers.put(handler.getProtocolHandled(), handler); }
/** * Registers a Protocol handler by adding it to the handlers map. * If the given protocol handler returns <code>null</code> as it's * supported protocol then it is registered as the default * protocol handler. * @param handler the new Protocol Handler to register */ public static synchronized void registerHandler (ParsedURLProtocolHandler handler) { if (handler.getProtocolHandled() == null) { defaultHandler = handler; return; } Map handlers = getHandlersMap(); handlers.put(handler.getProtocolHandled(), handler); }
/** * Registers a Protocol handler by adding it to the handlers map. * If the given protocol handler returns <code>null</code> as it's * supported protocol then it is registered as the default * protocol handler. * @param handler the new Protocol Handler to register */ public static synchronized void registerHandler (ParsedURLProtocolHandler handler) { if (handler.getProtocolHandled() == null) { defaultHandler = handler; return; } Map handlers = getHandlersMap(); handlers.put(handler.getProtocolHandled(), handler); }