Class RequestHandler

java.lang.Object
com.mendix.externalinterface.connector.RequestHandler

public abstract class RequestHandler extends Object
  • Field Details

  • Constructor Details

    • RequestHandler

      public RequestHandler()
    • RequestHandler

      @Deprecated public RequestHandler(Object component)
      Deprecated.
      As of Mendix 8.11. Use the no-arg constructor.
      Construct RequestHandler.
  • Method Details

    • doProcessRequest

      public void doProcessRequest(com.mendix.m2ee.api.IMxRuntimeRequest request, com.mendix.m2ee.api.IMxRuntimeResponse response, String path) throws Exception
      Throws:
      Exception
    • processRequest

      protected abstract void processRequest(com.mendix.m2ee.api.IMxRuntimeRequest request, com.mendix.m2ee.api.IMxRuntimeResponse response, String path) throws Exception
      Process the request.
      Throws:
      Exception
    • getSessionFromRequest

      protected ISession getSessionFromRequest(com.mendix.m2ee.api.IMxRuntimeRequest request) throws CoreException
      Get the session using the cookie. No csrf check will be performed.
      Parameters:
      request - the request from which to get the session
      Returns:
      the session
      Throws:
      CoreException - if the session cannot be retrieved
    • getSessionFromRequest

      protected ISession getSessionFromRequest(com.mendix.m2ee.api.IMxRuntimeRequest request, boolean performCSRFCheck) throws CoreException
      Get the session using the cookie.
      Parameters:
      request - the request from which to get the session
      performCSRFCheck - whether a csrf check will be performed using the request headers
      Returns:
      the session
      Throws:
      CoreException - if the session cannot be retrieved
    • isSessionKilledByNewLogin

      protected boolean isSessionKilledByNewLogin(com.mendix.m2ee.api.IMxRuntimeRequest request)
      Returns whether the specified session has expired.
      Parameters:
      request - the request from which to get the session
      Returns:
      true if the session expired, false otherwise
    • buildUserInfo

      protected String buildUserInfo(IContext context)
    • getExpiresTimeStamp

      protected long getExpiresTimeStamp(int addYears)
    • formatDate

      protected String formatDate(Date date)
    • parseDate

      protected Date parseDate(String date) throws ParseException
      Throws:
      ParseException
    • getSessionCookieName

      protected String getSessionCookieName()