Package com.helger.xservlet.handler
Class XServletHandlerOPTIONS
- java.lang.Object
-
- com.helger.xservlet.handler.XServletHandlerOPTIONS
-
- All Implemented Interfaces:
IXServletBasicHandler,IXServletHandler
public class XServletHandlerOPTIONS extends Object implements IXServletHandler
Called by the server (via theservicemethod) to allow a servlet to handle a OPTIONS request. An OPTIONS request returns the allowed HTTP methods supported by the servlet in the ALLOW HTTP response header.- Since:
- 9.0.0
- Author:
- Philip Helger
-
-
Constructor Summary
Constructors Constructor Description XServletHandlerOPTIONS(com.helger.commons.functional.ISupplier<String> aAllowProvider)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.helger.commons.functional.ISupplier<String>getAllowValueProvider()voidonRequest(javax.servlet.http.HttpServletRequest aHttpRequest, javax.servlet.http.HttpServletResponse aHttpResponse, com.helger.http.EHttpVersion eHTTPVersion, com.helger.commons.http.EHttpMethod eHTTPMethod, com.helger.web.scope.IRequestWebScope aRequestScope)Handle the servlet action for a certain request and response.StringtoString()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.helger.xservlet.handler.IXServletBasicHandler
onServletDestroy, onServletInit
-
-
-
-
Method Detail
-
getAllowValueProvider
@Nonnull public final com.helger.commons.functional.ISupplier<String> getAllowValueProvider()
- Returns:
- The value supplier passed in the constructor.
- Since:
- 9.3.2
-
onRequest
public void onRequest(@Nonnull javax.servlet.http.HttpServletRequest aHttpRequest, @Nonnull javax.servlet.http.HttpServletResponse aHttpResponse, @Nonnull com.helger.http.EHttpVersion eHTTPVersion, @Nonnull com.helger.commons.http.EHttpMethod eHTTPMethod, @Nonnull com.helger.web.scope.IRequestWebScope aRequestScope) throws javax.servlet.ServletException, IOException
Description copied from interface:IXServletHandlerHandle the servlet action for a certain request and response.- Specified by:
onRequestin interfaceIXServletHandler- Parameters:
aHttpRequest- HTTP servlet request. Nevernull.aHttpResponse- HTTP servlet response. Nevernull.eHTTPVersion- HTTP version. Nevernull.eHTTPMethod- HTTP method. Nevernull.aRequestScope- Request scope. Nevernull.- Throws:
javax.servlet.ServletException- On business errorIOException- On IO error
-
-