Code example for UriPatternMatcher

0
 * @deprecated (4.2) use {@link UriHttpAsyncRequestHandlerMapper} 
 */ 
@Deprecated 
public class NHttpRequestHandlerRegistry implements NHttpRequestHandlerResolver { 
 
    private final UriPatternMatcher<NHttpRequestHandler> matcher; 
 
    public NHttpRequestHandlerRegistry() { 
        matcher = new UriPatternMatcher<NHttpRequestHandler>(); 
    } 
 
    /** 
     * Registers the given {@link NHttpRequestHandler} as a handler for URIs 
     * matching the given pattern. 
     * 
     * @param pattern the pattern to register the handler for. 
     * @param handler the handler. 
     */ 
    public void register(final String pattern, final NHttpRequestHandler handler) { 
        matcher.register(pattern, handler); 
    }