Interface IProfiler


  • public interface IProfiler
    Interface which can be implemented to roll your own profiler for client requests. See "Profiling Module" in the AppStore for more information.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String PROFILER_KEY
      The name of the HTTP header for the profiler request token.
    • Field Detail

      • PROFILER_KEY

        static final java.lang.String PROFILER_KEY
        The name of the HTTP header for the profiler request token.
        See Also:
        Constant Field Values
    • Method Detail

      • enterRuntime

        java.lang.Object enterRuntime​(java.lang.String sessionId,
                                      java.lang.String requestId,
                                      java.lang.String userName,
                                      java.util.Set<java.lang.String> userRoles,
                                      com.mendix.thirdparty.org.json.JSONObject jsonRequest,
                                      java.lang.Long now)
        Method that is called upon handling a new request in the runtime.
        Parameters:
        sessionId - the session identifier of the request
        requestId - the identifier of the request
        userName - the name of the user that made the request
        userRoles - the security roles of the user that made the request
        jsonRequest - the JSON content of the request
        now - the timestamp of the request (in milliseconds since the Unix epoch)
        Returns:
        some object that will be passed to the corresponding finishRuntime(java.lang.Object, java.lang.Long)
      • enterDatabase

        java.lang.Object enterDatabase​(java.lang.String sessionId,
                                       java.lang.String requestId,
                                       java.lang.String requestData,
                                       java.lang.Long now)
        Method that is called upon issuing a new query to the database.
        Parameters:
        sessionId - the session identifier of the session for which the query is made
        requestId - the identifier of the request for which the query is made
        requestData - the SQL statement that is sent to the database
        now - the timestamp of the request (in milliseconds since the Unix epoch)
        Returns:
        some object that will be passed to the corresponding finishDatabase(java.lang.Object, java.lang.Long)
      • stop

        void stop()
        Stops the profiler.