Interface OpenKit

  • All Superinterfaces:
    java.lang.AutoCloseable, java.io.Closeable
    All Known Implementing Classes:
    OpenKitImpl

    public interface OpenKit
    extends java.io.Closeable
    This 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
      Session createSession()
      Creates a Session instance which can then be used to create Actions.
      Session createSession​(java.lang.String clientIPAddress)
      Creates a Session instance which can then be used to create Actions.
      boolean isInitialized()
      Returns whether OpenKit is initialized or not.
      void shutdown()
      Shuts down OpenKit, ending all open Sessions and waiting for them to be sent.
      boolean waitForInitCompletion()
      Waits until OpenKit is fully initialized.
      boolean waitForInitCompletion​(long timeoutMillis)
      Waits until OpenKit is fully initialized or the given timeout expired.
      • Methods inherited from interface java.io.Closeable

        close
    • 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, if DynatraceOpenKitBuilder is wrongly configured, for example when creating an instance with an incorrect endpoint URL, then this method might hang indefinitely, unless shutdown() is called.

        Returns:
        true when OpenKit is fully initialized, false when 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 DynatraceOpenKitBuilder is wrongly configured, for example when creating an instance with an incorrect endpoint URL, then this method might hang indefinitely, unless shutdown() is called or timeout expires.

        Parameters:
        timeoutMillis - The maximum number of milliseconds to wait for initialization being completed.
        Returns:
        true when OpenKit is fully initialized, false when a shutdown request was made or timeoutMillis expired.
      • isInitialized

        boolean isInitialized()
        Returns whether OpenKit is initialized or not.
        Returns:
        true if OpenKit is fully initialized, false if 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.