Class OpenKitImpl

    • Constructor Detail

      • OpenKitImpl

        public OpenKitImpl​(OpenKitInitializer initializer)
        Public constructor for creating an OpenKit instance.
        Parameters:
        initializer - provider to get all OpenKit related configuration parameters.
    • Method Detail

      • initialize

        public void initialize()
        Initialize this OpenKit instance.

        This method starts the BeaconSender and is called directly after the instance has been created in DynatraceOpenKitBuilder.

      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
      • waitForInitCompletion

        public boolean waitForInitCompletion()
        Description copied from interface: OpenKit
        Waits until OpenKit is fully initialized.

        The calling thread is blocked until OpenKit is fully initialized or until OpenKit is shut down using the OpenKit.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 OpenKit.shutdown() is called.

        Specified by:
        waitForInitCompletion in interface OpenKit
        Returns:
        true when OpenKit is fully initialized, false when a shutdown request was made.
      • waitForInitCompletion

        public boolean waitForInitCompletion​(long timeoutMillis)
        Description copied from interface: OpenKit
        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 OpenKit.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 OpenKit.shutdown() is called or timeout expires.

        Specified by:
        waitForInitCompletion in interface OpenKit
        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

        public boolean isInitialized()
        Description copied from interface: OpenKit
        Returns whether OpenKit is initialized or not.
        Specified by:
        isInitialized in interface OpenKit
        Returns:
        true if OpenKit is fully initialized, false if OpenKit still performs initialization.
      • createSession

        public Session createSession​(java.lang.String clientIPAddress)
        Description copied from interface: OpenKit
        Creates a Session instance which can then be used to create Actions.
        Specified by:
        createSession in interface OpenKit
        Parameters:
        clientIPAddress - client IP address where this Session is coming from
        Returns:
        Session instance to work with
      • createSession

        public Session createSession()
        Description copied from interface: OpenKit
        Creates a Session instance which can then be used to create Actions.

        This is similar to the method OpenKit.createSession(String), except that the client's IP address is determined on the server side.

        Specified by:
        createSession in interface OpenKit
        Returns:
        Session instance to work with
      • shutdown

        public void shutdown()
        Description copied from interface: OpenKit
        Shuts down OpenKit, ending all open Sessions and waiting for them to be sent.
        Specified by:
        shutdown in interface OpenKit