public static void registerRequestHandler ( RequestHandler < ? extends Request > rh ) { if ( rh == null ) { throw new NullPointerException ( "rh is null" ) ; } if ( rh . handles ( ) == null ) { throw new NullPointerException ( "rh.handles() returns null" ) ; } if ( sRequestHandlers == null ) { initializeDefaultHandlers ( ) ; } if ( sRequestHandlers . containsKey ( rh . handles ( ) ) ) { throw new RuntimeException ( "RequestHandler already registered for " + rh . handles ( ) ) ; } sRequestHandlers . put ( rh . handles ( ) , rh ) ; }
Register a custom request handler .