src/jdk.httpserver/share/classes/com/sun/net/httpserver/HttpServer.java
changeset 55636 37cfb64319f6
parent 47216 71c04702a3d5
equal deleted inserted replaced
55635:0fb70c9118ce 55636:37cfb64319f6
     1 /*
     1 /*
     2  * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
   204      * <p>
   204      * <p>
   205      * The path specifies the root URI path for this context. The first character of path must be
   205      * The path specifies the root URI path for this context. The first character of path must be
   206      * '/'. <p>
   206      * '/'. <p>
   207      * The class overview describes how incoming request URIs are <a href="#mapping_description">mapped</a>
   207      * The class overview describes how incoming request URIs are <a href="#mapping_description">mapped</a>
   208      * to HttpContext instances.
   208      * to HttpContext instances.
       
   209      * @apiNote The path should generally, but is not required to, end with '/'. If the path does not
       
   210      * end with '/', eg such as with {@code "/foo"} then this would match requests with a path of
       
   211      * {@code "/foobar"} or {@code "/foo/bar"}.
       
   212      *
   209      * @param path the root URI path to associate the context with
   213      * @param path the root URI path to associate the context with
   210      * @param handler the handler to invoke for incoming requests.
   214      * @param handler the handler to invoke for incoming requests.
   211      * @throws IllegalArgumentException if path is invalid, or if a context
   215      * @throws IllegalArgumentException if path is invalid, or if a context
   212      *          already exists for this path
   216      *          already exists for this path
   213      * @throws NullPointerException if either path, or handler are <code>null</code>
   217      * @throws NullPointerException if either path, or handler are <code>null</code>
   225      * <p>
   229      * <p>
   226      * The path specifies the root URI path for this context. The first character of path must be
   230      * The path specifies the root URI path for this context. The first character of path must be
   227      * '/'. <p>
   231      * '/'. <p>
   228      * The class overview describes how incoming request URIs are <a href="#mapping_description">mapped</a>
   232      * The class overview describes how incoming request URIs are <a href="#mapping_description">mapped</a>
   229      * to HttpContext instances.
   233      * to HttpContext instances.
       
   234      * @apiNote The path should generally, but is not required to, end with '/'. If the path does not
       
   235      * end with '/', eg such as with {@code "/foo"} then this would match requests with a path of
       
   236      * {@code "/foobar"} or {@code "/foo/bar"}.
       
   237      *
   230      * @param path the root URI path to associate the context with
   238      * @param path the root URI path to associate the context with
   231      * @throws IllegalArgumentException if path is invalid, or if a context
   239      * @throws IllegalArgumentException if path is invalid, or if a context
   232      *          already exists for this path
   240      *          already exists for this path
   233      * @throws NullPointerException if path is <code>null</code>
   241      * @throws NullPointerException if path is <code>null</code>
   234      */
   242      */