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 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 interface org.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 interface org.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 interface org.springframework.web.servlet.HandlerInterceptor
      Throws:
      Exception
    • shouldManage

      public static boolean shouldManage(Object handler)
      Checks whether the given handler is either an old-style or a new-style service.
      Parameters:
      handler -
      Returns: