public class OptionsHandler extends java.lang.Object implements MethodHandler
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
INVALID_CORS_REQUEST |
| Constructor and Description |
|---|
OptionsHandler(HttpRequest optionsRequest,
java.util.List<Mapping> mappings,
java.util.Map<Mapping,RequestHandler> mappingMap) |
| Modifier and Type | Method and Description |
|---|---|
Addition |
getAddition()
Get addition configuration, addition provides some added value.
|
CrossOrigin |
getCrossOrigin()
Get cross origin information.
|
java.lang.String |
getETag(HttpRequest request)
Get the
ETag requesting the specified resource. |
long |
getLastModified(HttpRequest request)
The return value will be sent to the HTTP client as
Last-Modified header, and compared with If-Modified-Since headers that the client sends back. |
Mapping |
getMapping()
Get mapping configuration, mapping provides all the annotation information for this method.
|
View |
handle(HttpRequest request,
HttpResponse response)
Use the given handler to handle this request.
|
public static final java.lang.String INVALID_CORS_REQUEST
public OptionsHandler(HttpRequest optionsRequest, java.util.List<Mapping> mappings, java.util.Map<Mapping,RequestHandler> mappingMap)
public Addition getAddition()
MethodHandlergetAddition in interface MethodHandlerAddition.public CrossOrigin getCrossOrigin()
MethodHandlergetCrossOrigin in interface MethodHandlerCrossOriginpublic Mapping getMapping()
MethodHandlergetMapping in interface MethodHandlerMapping.public View handle(HttpRequest request, HttpResponse response) throws java.lang.Throwable
RequestHandlerhandle in interface RequestHandlerrequest - current request.response - current response.java.lang.Throwablepublic java.lang.String getETag(HttpRequest request) throws java.lang.Throwable
ETagETag requesting the specified resource.
Can simply return null if there's no support.
public long getLastModified(HttpRequest request) throws java.lang.Throwable
LastModifiedLast-Modified header, and compared with If-Modified-Since headers that the client sends back. The content will only get regenerated if there has been a
modification.getLastModified in interface LastModifiedrequest - current requestjava.lang.Throwable