Class LegacyAndNewStyleServiceConnectioManagementHandlerInterceptor
java.lang.Object
it.uniroma2.art.semanticturkey.mvc.LegacyAndNewStyleServiceConnectioManagementHandlerInterceptor
- All Implemented Interfaces:
org.springframework.web.servlet.HandlerInterceptor
public class LegacyAndNewStyleServiceConnectioManagementHandlerInterceptor
extends Object
implements org.springframework.web.servlet.HandlerInterceptor
An
HandlerInterceptor
that implements connection management for legacy (e.g. Cls in
st-core-services) and new-style services (e.g. Resource View in st-core-services). Such services should not
be confused with newer new-style services, which are being introduced.- Author:
- Manuel Fiorelli
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
afterCompletion
(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Object handler, Exception ex) void
postHandle
(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Object handler, org.springframework.web.servlet.ModelAndView modelAndView) boolean
preHandle
(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Object handler) static boolean
shouldManage
(Object handler) Checks whether the givenhandler
is either an old-style or a new-style service.
-
Constructor Details
-
LegacyAndNewStyleServiceConnectioManagementHandlerInterceptor
public LegacyAndNewStyleServiceConnectioManagementHandlerInterceptor()
-
-
Method Details
-
preHandle
public boolean preHandle(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Object handler) throws Exception - Specified by:
preHandle
in interfaceorg.springframework.web.servlet.HandlerInterceptor
- Throws:
Exception
-
postHandle
public void postHandle(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Object handler, org.springframework.web.servlet.ModelAndView modelAndView) throws Exception - Specified by:
postHandle
in interfaceorg.springframework.web.servlet.HandlerInterceptor
- Throws:
Exception
-
afterCompletion
public void afterCompletion(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Object handler, Exception ex) throws Exception - Specified by:
afterCompletion
in interfaceorg.springframework.web.servlet.HandlerInterceptor
- Throws:
Exception
-
shouldManage
Checks whether the givenhandler
is either an old-style or a new-style service.- Parameters:
handler
-- Returns:
-