public class NullSession extends java.lang.Object implements Session
OpenKit.createSession(String) when the OpenKit.shutdown()
has been called before.| Constructor and Description |
|---|
NullSession() |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
end()
Ends this Session and marks it as ready for immediate sending.
|
RootAction |
enterAction(java.lang.String actionName)
Enters an Action with a specified name in this Session.
|
void |
identifyUser(java.lang.String userTag)
Tags a session with the provided
userTag. |
void |
reportCrash(java.lang.String errorName,
java.lang.String reason,
java.lang.String stacktrace)
Reports a crash with a specified error name, crash reason and a stacktrace.
|
WebRequestTracer |
traceWebRequest(java.lang.String url)
Allows tracing and timing of a web request handled by any 3rd party HTTP Client (e.g.
|
WebRequestTracer |
traceWebRequest(java.net.URLConnection connection)
Traces a web request - which is provided as a URLConnection - and allows adding timing information to this request.
|
public RootAction enterAction(java.lang.String actionName)
Session
If the given actionName is null or an empty string,
no reporting will happen on that RootAction.
enterAction in interface SessionactionName - name of the Actionpublic void identifyUser(java.lang.String userTag)
SessionuserTag.
If the given userTag is null or an empty string,
no user identification will be reported to the server.
identifyUser in interface SessionuserTag - id of the userpublic void reportCrash(java.lang.String errorName,
java.lang.String reason,
java.lang.String stacktrace)
Session
If the given errorName is null or an empty string,
no crash report will be sent to the server.
reportCrash in interface SessionerrorName - name of the error leading to the crash (e.g. Exception class)reason - reason or description of that errorstacktrace - stacktrace leading to that crashpublic WebRequestTracer traceWebRequest(java.net.URLConnection connection)
SessiontraceWebRequest in interface Sessionconnection - the URLConnection of the HTTP request to be tagged and timedpublic WebRequestTracer traceWebRequest(java.lang.String url)
SessionOpenKitConstants.WEBREQUEST_TAG_HEADER) has to be set manually to the
tag value of this WebRequestTracer. traceWebRequest in interface Sessionurl - the URL of the web request to be tagged and timedpublic void end()
Sessionpublic void close()
close in interface java.io.Closeableclose in interface java.lang.AutoCloseable