Package common.http.interceptor
Class InterceptableServlet
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- javax.servlet.http.HttpServlet
-
- common.http.interceptor.InterceptableServlet
-
- All Implemented Interfaces:
Serializable,Servlet,ServletConfig
- Direct Known Subclasses:
ImageServlet
public abstract class InterceptableServlet extends HttpServlet
Estende la classe astrattaHttpServletper fornire supporto al meccanismo degli interceptor. È possibile applicare gli interceptor in due modi:- Applicando l'annotazione associata all'interceptor desiderato sul metodo "doX" desiderato
- Applicando l'annotazione associata all'interceptor desiderato sulla classe interceptor. In questo modo, l'interceptor sarà applicato a tutti i metodi "doX" sovrascritti.
@RequireAuthentication @EnableLogging(SEVERE) private static class SampleInterceptableServlet extends InterceptableServlet{ @Override @ErrorsAsJson protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { .... } }- See Also:
ServletInterceptor,HttpServlet, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description InterceptableServlet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidservice(HttpServletRequest req, HttpServletResponse resp)voidservice(ServletRequest req, ServletResponse res)-
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified
-
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
-
-
-
-
Constructor Detail
-
InterceptableServlet
public InterceptableServlet()
-
-
Method Detail
-
service
protected final void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException
- Overrides:
servicein classHttpServlet- Throws:
ServletExceptionIOException
-
service
public final void service(ServletRequest req, ServletResponse res) throws ServletException, IOException
- Specified by:
servicein interfaceServlet- Overrides:
servicein classHttpServlet- Throws:
ServletExceptionIOException
-
-