public class HttpHandlerRegistration extends Object
HttpHandler
registration information on a
HttpServer
.
An instance of the class could be created either from String
using
fromString(java.lang.String)
method, or builder builder()
.Modifier and Type | Class and Description |
---|---|
static class |
HttpHandlerRegistration.Builder |
Modifier and Type | Field and Description |
---|---|
static HttpHandlerRegistration |
ROOT |
Modifier and Type | Method and Description |
---|---|
static HttpHandlerRegistration.Builder |
builder() |
static HttpHandlerRegistration.Builder |
bulder()
Deprecated.
typo :(
|
boolean |
equals(Object obj) |
static HttpHandlerRegistration |
fromString(String mapping)
Create a registration from the mapping
String . |
String |
getContextPath() |
String |
getUrlPattern() |
int |
hashCode() |
public static final HttpHandlerRegistration ROOT
public static HttpHandlerRegistration.Builder builder()
public static HttpHandlerRegistration.Builder bulder()
public static HttpHandlerRegistration fromString(String mapping)
String
.
The part of the mapping before the second slash '/' occurrence will
be treated as context-path and the remainder will be treated as
a url-pattern.
For example:
1) "" will be treated as context-path("") and url-pattern("");
2) "/" will be treated as context-path("") and url-pattern("/");
3) "/a/b/c" will be treated as context-path("/a") and url-pattern("/b/c");
4) "/*" will be treated as context-path("") and url-pattern("/*")
5) "*.jpg" will be treated as context-path("") and url-pattern("*.jpg")mapping
- the String
HttpHandlerRegistration
public String getContextPath()
public String getUrlPattern()
Copyright © 2017 Oracle Corporation. All Rights Reserved.