Class HttpHandlerRegistration
- java.lang.Object
-
- org.glassfish.grizzly.http.server.HttpHandlerRegistration
-
public class HttpHandlerRegistration extends Object
Class representingHttpHandlerregistration information on aHttpServer. An instance of the class could be created either fromStringusingfromString(java.lang.String)method, or builderbuilder().- Author:
- Alexey Stashok
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classHttpHandlerRegistration.Builder
-
Field Summary
Fields Modifier and Type Field Description static HttpHandlerRegistrationROOT
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static HttpHandlerRegistration.Builderbuilder()static HttpHandlerRegistration.Builderbulder()Deprecated.typo :(booleanequals(Object obj)static HttpHandlerRegistrationfromString(String mapping)Create a registration from the mappingString.StringgetContextPath()StringgetUrlPattern()inthashCode()
-
-
-
Field Detail
-
ROOT
public static final HttpHandlerRegistration ROOT
-
-
Method Detail
-
builder
public static HttpHandlerRegistration.Builder builder()
- Returns:
- the HttpHandlerRegistration builder.
-
bulder
@Deprecated public static HttpHandlerRegistration.Builder bulder()
Deprecated.typo :(- Returns:
- the HttpHandlerRegistration builder.
-
fromString
public static HttpHandlerRegistration fromString(String mapping)
Create a registration from the mappingString. 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")- Parameters:
mapping- theString- Returns:
HttpHandlerRegistration
-
getContextPath
public String getContextPath()
- Returns:
- context-path part of the registration
-
getUrlPattern
public String getUrlPattern()
- Returns:
- url-pattern part of the registration
-
-