Interface OpenKit
-
- All Superinterfaces:
java.lang.AutoCloseable,java.io.Closeable
- All Known Implementing Classes:
OpenKitImpl
public interface OpenKit extends java.io.CloseableThis interface provides basic OpenKit functionality, like creating a Session and shutting down OpenKit.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description SessioncreateSession()Creates a Session instance which can then be used to create Actions.SessioncreateSession(java.lang.String clientIPAddress)Creates a Session instance which can then be used to create Actions.booleanisInitialized()Returns whether OpenKit is initialized or not.voidshutdown()Shuts down OpenKit, ending all open Sessions and waiting for them to be sent.booleanwaitForInitCompletion()Waits until OpenKit is fully initialized.booleanwaitForInitCompletion(long timeoutMillis)Waits until OpenKit is fully initialized or the given timeout expired.
-
-
-
Method Detail
-
waitForInitCompletion
boolean waitForInitCompletion()
Waits until OpenKit is fully initialized.The calling thread is blocked until OpenKit is fully initialized or until OpenKit is shut down using the
shutdown()method. Be aware, ifDynatraceOpenKitBuilderis wrongly configured, for example when creating an instance with an incorrect endpoint URL, then this method might hang indefinitely, unlessshutdown()is called.- Returns:
truewhen OpenKit is fully initialized,falsewhen a shutdown request was made.
-
waitForInitCompletion
boolean waitForInitCompletion(long timeoutMillis)
Waits until OpenKit is fully initialized or the given timeout expired.The calling thread is blocked until OpenKit is fully initialized or until OpenKit is shut down using the
shutdown()method or the timeout expired..Be aware, if
DynatraceOpenKitBuilderis wrongly configured, for example when creating an instance with an incorrect endpoint URL, then this method might hang indefinitely, unlessshutdown()is called or timeout expires.- Parameters:
timeoutMillis- The maximum number of milliseconds to wait for initialization being completed.- Returns:
truewhen OpenKit is fully initialized,falsewhen a shutdown request was made ortimeoutMillisexpired.
-
isInitialized
boolean isInitialized()
Returns whether OpenKit is initialized or not.- Returns:
trueif OpenKit is fully initialized,falseif OpenKit still performs initialization.
-
createSession
Session createSession(java.lang.String clientIPAddress)
Creates a Session instance which can then be used to create Actions.- Parameters:
clientIPAddress- client IP address where this Session is coming from- Returns:
- Session instance to work with
-
createSession
Session createSession()
Creates a Session instance which can then be used to create Actions.This is similar to the method
createSession(String), except that the client's IP address is determined on the server side.- Returns:
- Session instance to work with
-
shutdown
void shutdown()
Shuts down OpenKit, ending all open Sessions and waiting for them to be sent.
-
-