public class OpenKitImpl extends OpenKitComposite implements OpenKit, SessionCreatorInput
OpenKit interface.| Constructor and Description |
|---|
OpenKitImpl(OpenKitInitializer initializer)
Public constructor for creating an OpenKit instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
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.
|
BeaconCache |
getBeaconCache()
Returns the beacon cache in which new sessions/beacons will be stored until they are sent.
|
int |
getCurrentServerId()
Returns the current server ID.
|
Logger |
getLogger()
Returns the logger to report/trace messages.
|
OpenKitConfiguration |
getOpenKitConfiguration()
Returns the application / device related configuration
|
PrivacyConfiguration |
getPrivacyConfiguration()
Returns the privacy related configuration
|
SessionIDProvider |
getSessionIdProvider()
Returns the provider to obtain the next session ID
|
ThreadIDProvider |
getThreadIdProvider()
Returns the provider to obtain the ID of the current thread.
|
TimingProvider |
getTimingProvider()
Returns the provider to obtain the current timestamp.
|
void |
initialize()
Initialize this OpenKit instance.
|
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.
|
getActionIDpublic OpenKitImpl(OpenKitInitializer initializer)
initializer - provider to get all OpenKit related configuration parameters.public void initialize()
This method starts the BeaconSender and is called directly after
the instance has been created in AbstractOpenKitBuilder.
public void close()
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablepublic boolean waitForInitCompletion()
OpenKit
The calling thread is blocked until OpenKit is fully initialized or until OpenKit is shut down using the
OpenKit.shutdown() method.
Be aware, if AbstractOpenKitBuilder 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.
waitForInitCompletion in interface OpenKittrue when OpenKit is fully initialized, false when a shutdown request was made.public boolean waitForInitCompletion(long timeoutMillis)
OpenKit
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 AbstractOpenKitBuilder 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.
waitForInitCompletion in interface OpenKittimeoutMillis - The maximum number of milliseconds to wait for initialization being completed.true when OpenKit is fully initialized, false when a shutdown request was made or timeoutMillis expired.public boolean isInitialized()
OpenKitisInitialized in interface OpenKittrue if OpenKit is fully initialized, false if OpenKit still performs initialization.public Session createSession(java.lang.String clientIPAddress)
OpenKitcreateSession in interface OpenKitclientIPAddress - client IP address where this Session is coming frompublic Session createSession()
OpenKit
This is similar to the method OpenKit.createSession(String), except that
the client's IP address is determined on the server side.
createSession in interface OpenKitpublic void shutdown()
OpenKitpublic Logger getLogger()
SessionCreatorInputgetLogger in interface SessionCreatorInputpublic OpenKitConfiguration getOpenKitConfiguration()
SessionCreatorInputgetOpenKitConfiguration in interface SessionCreatorInputpublic PrivacyConfiguration getPrivacyConfiguration()
SessionCreatorInputgetPrivacyConfiguration in interface SessionCreatorInputpublic BeaconCache getBeaconCache()
SessionCreatorInputgetBeaconCache in interface SessionCreatorInputpublic SessionIDProvider getSessionIdProvider()
SessionCreatorInputgetSessionIdProvider in interface SessionCreatorInputpublic ThreadIDProvider getThreadIdProvider()
SessionCreatorInputgetThreadIdProvider in interface SessionCreatorInputpublic TimingProvider getTimingProvider()
SessionCreatorInputgetTimingProvider in interface SessionCreatorInputpublic int getCurrentServerId()
SessionCreatorInputgetCurrentServerId in interface SessionCreatorInput