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.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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.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.void
finishDatabase(java.lang.Object logObject, java.lang.Long now)
Method that is called upon finishing a query on the database.void
finishRuntime(java.lang.Object logObject, java.lang.Long now)
Method that is called upon finishing a request in the runtime.void
logClientData(com.mendix.thirdparty.org.json.JSONObject jsonObject, java.lang.String sessionId)
Method that is called right afterenterRuntime(java.lang.String, java.lang.String, java.lang.String, java.util.Set<java.lang.String>, com.mendix.thirdparty.org.json.JSONObject, java.lang.Long)
, containing the same information.void
stop()
Stops the profiler.
-
-
-
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 requestrequestId
- the identifier of the requestuserName
- the name of the user that made the requestuserRoles
- the security roles of the user that made the requestjsonRequest
- the JSON content of the requestnow
- 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)
-
finishRuntime
void finishRuntime(java.lang.Object logObject, java.lang.Long now)
Method that is called upon finishing a request in the runtime.- Parameters:
logObject
- the object that was returned by the correspondingenterRuntime(java.lang.String, java.lang.String, java.lang.String, java.util.Set<java.lang.String>, com.mendix.thirdparty.org.json.JSONObject, java.lang.Long)
now
- the timestamp of the end of the request (in milliseconds since the Unix epoch)
-
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 maderequestId
- the identifier of the request for which the query is maderequestData
- the SQL statement that is sent to the databasenow
- 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)
-
finishDatabase
void finishDatabase(java.lang.Object logObject, java.lang.Long now)
Method that is called upon finishing a query on the database.- Parameters:
logObject
- the object that was returned by the correspondingenterDatabase(java.lang.String, java.lang.String, java.lang.String, java.lang.Long)
now
- the timestamp of the query result (in milliseconds since the Unix epoch)
-
logClientData
void logClientData(com.mendix.thirdparty.org.json.JSONObject jsonObject, java.lang.String sessionId)
Method that is called right afterenterRuntime(java.lang.String, java.lang.String, java.lang.String, java.util.Set<java.lang.String>, com.mendix.thirdparty.org.json.JSONObject, java.lang.Long)
, containing the same information.- Parameters:
jsonObject
- the JSON content of the requestsessionId
- the session identifier of the request
-
stop
void stop()
Stops the profiler.
-
-