Class UriHttpAsyncRequestHandlerMapper

  • All Implemented Interfaces:
    HttpAsyncRequestHandlerMapper

    @Contract(threading=SAFE)
    public class UriHttpAsyncRequestHandlerMapper
    extends java.lang.Object
    implements HttpAsyncRequestHandlerMapper
    Maintains a map of HTTP request handlers keyed by a request URI pattern.
    Patterns may have three formats:
    • *
    • *<uri>
    • <uri>*

    This class can be used to map an instance of HttpAsyncRequestHandler matching a particular request URI. Usually the mapped request handler will be used to process the request with the specified request URI.
    Since:
    4.3
    • Constructor Detail

      • UriHttpAsyncRequestHandlerMapper

        public UriHttpAsyncRequestHandlerMapper()
    • Method Detail

      • register

        public void register​(java.lang.String pattern,
                             HttpAsyncRequestHandler<?> handler)
        Registers the given HttpAsyncRequestHandler as a handler for URIs matching the given pattern.
        Parameters:
        pattern - the pattern to register the handler for.
        handler - the handler.
      • unregister

        public void unregister​(java.lang.String pattern)
        Removes registered handler, if exists, for the given pattern.
        Parameters:
        pattern - the pattern to unregister the handler for.