public interface RequestInterceptor extends EntityProvider
| Modifier and Type | Method and Description |
|---|---|
void |
after(EntityView view,
HttpServletRequest req,
HttpServletResponse res)
Take actions after the request is handled for an entity view,
this will be called just before each response is sent back to the requester,
normally this would be used to add something to the response as it is getting ready to be
sent back to the requester
|
void |
before(EntityView view,
HttpServletRequest req,
HttpServletResponse res)
Take actions before the request is handled for an entity view,
this will be called just before each request is sent to the correct request handler,
this might be used to add information to the response before it goes on to be handled
or to take some action as a result of information in the request or reference,
if you want to interrupt the handling of this request (stop it) then throw an EntityException and include the type of response you would like to return in the exception
(this can be a success or failure response status) |
getEntityPrefixvoid before(EntityView view, HttpServletRequest req, HttpServletResponse res)
EntityException and include the type of response you would like to return in the exception
(this can be a success or failure response status)view - an entity view, should contain all the information related to the incoming entity URLreq - the servlet request (available in case you need to get anything out of it)res - the servlet response, put the correct data response into the outputstreamvoid after(EntityView view, HttpServletRequest req, HttpServletResponse res)
view - an entity view, should contain all the information related to the incoming entity URLreq - the servlet request (available in case you need to get anything out of it)res - the servlet response, put the correct data response into the outputstreamCopyright © 2023. All rights reserved.