public abstract class AbstractOpenKitBuilder
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
OpenKit |
build()
Builds a new
OpenKit instance |
protected static long |
deviceIdFromString(java.lang.String deviceId) |
AbstractOpenKitBuilder |
enableVerbose()
Deprecated.
|
abstract java.lang.String |
getApplicationID()
Get the application id for which the OpenKit reports data.
|
abstract java.lang.String |
getApplicationName()
Get the application name.
|
java.lang.String |
getApplicationVersion()
Get the application version that has been set with
withApplicationVersion(String). |
long |
getBeaconCacheLowerMemoryBoundary()
Get the beacon cache lower memory boundary that has been set with
withBeaconCacheLowerMemoryBoundary(long). |
long |
getBeaconCacheMaxRecordAge()
Get the maximum beacon cache record age that has been set with
withBeaconCacheMaxRecordAge(long). |
long |
getBeaconCacheUpperMemoryBoundary()
Get the beacon cache upper memory boundary that has been set with
withBeaconCacheUpperMemoryBoundary(long). |
CrashReportingLevel |
getCrashReportLevel()
Get crash reporting level that has been set with
withCrashReportingLevel(CrashReportingLevel). |
DataCollectionLevel |
getDataCollectionLevel()
Get data collection level that has been set with
withDataCollectionLevel(DataCollectionLevel). |
abstract int |
getDefaultServerID()
Get the default server ID to communicate with.
|
long |
getDeviceID()
Get this device identifier that has been set in the constructor.
|
java.lang.String |
getEndpointURL()
Get the endpoint URL that has been set in the constructor.
|
Logger |
getLogger()
Get
Logger that has been set with withLogger(Logger). |
java.lang.String |
getManufacturer()
Get the manufacturer that has been set with
withManufacturer(String). |
java.lang.String |
getModelID()
Get the model identifier that has been set with
withModelID(String). |
abstract java.lang.String |
getOpenKitType()
Get a string identifying the OpenKit type that gets created by this builder.
|
java.lang.String |
getOperatingSystem()
Get the operating system that has been set with
withOperatingSystem(String). |
java.lang.String |
getOrigDeviceID()
Returns the
device identifier in the representation before it was hashed (in case the
original device ID was a non numeric string). |
SSLTrustManager |
getTrustManager()
Get the SSL trust manager that has been set with
withTrustManager(SSLTrustManager). |
AbstractOpenKitBuilder |
withApplicationVersion(java.lang.String applicationVersion)
Defines the version of the application.
|
AbstractOpenKitBuilder |
withBeaconCacheLowerMemoryBoundary(long lowerMemoryBoundaryInBytes)
Sets the lower memory boundary of the beacon cache.
|
AbstractOpenKitBuilder |
withBeaconCacheMaxRecordAge(long maxRecordAgeInMilliseconds)
Sets the maximum beacon record age of beacon data in cache.
|
AbstractOpenKitBuilder |
withBeaconCacheUpperMemoryBoundary(long upperMemoryBoundaryInBytes)
Sets the upper memory boundary of the beacon cache.
|
AbstractOpenKitBuilder |
withCrashReportingLevel(CrashReportingLevel crashReportLevel)
Sets the flag if crash reporting is enabled
OFF (0) - Crashes are not sent to the serverOPT_OUT_CRASHES (1) - Crashes are not sent to the serverOPT_IN_CRASHES (2) - Crashes are sent to the serverDefault value: OPT_IN_CRASHES |
AbstractOpenKitBuilder |
withDataCollectionLevel(DataCollectionLevel dataCollectionLevel)
Sets the data collection level.
|
AbstractOpenKitBuilder |
withLogger(Logger logger)
Sets the logger.
|
AbstractOpenKitBuilder |
withLogLevel(LogLevel level)
Sets the default log level if the default logger is used.
|
AbstractOpenKitBuilder |
withManufacturer(java.lang.String manufacturer)
Sets the manufacturer information.
|
AbstractOpenKitBuilder |
withModelID(java.lang.String modelID)
Sets the model id.
|
AbstractOpenKitBuilder |
withOperatingSystem(java.lang.String operatingSystem)
Sets the operating system information.
|
AbstractOpenKitBuilder |
withTrustManager(SSLTrustManager trustManager)
Sets the trust manager.
|
protected static long deviceIdFromString(java.lang.String deviceId)
@Deprecated public AbstractOpenKitBuilder enableVerbose()
withLogLevel(LogLevel)withLogger debug and info log output
depends on the values returned by isDebugEnabled and isInfoEnabled.thispublic AbstractOpenKitBuilder withLogLevel(LogLevel level)
withLogger(Logger), debug and info log output
depends on the values returned by Logger.isDebugEnabled() and Logger.isInfoEnabled().level - The logLevel for the custom loggerAbstractOpenKitBuilderpublic AbstractOpenKitBuilder withLogger(Logger logger)
enableVerbose.logger - the loggerthispublic AbstractOpenKitBuilder withApplicationVersion(java.lang.String applicationVersion)
applicationVersion - the application versionthispublic AbstractOpenKitBuilder withTrustManager(SSLTrustManager trustManager)
SSLStrictTrustManager by default-trustManager - trust manager implementationthispublic AbstractOpenKitBuilder withOperatingSystem(java.lang.String operatingSystem)
operatingSystem - the operating systemthispublic AbstractOpenKitBuilder withManufacturer(java.lang.String manufacturer)
manufacturer - the manufacturerthispublic AbstractOpenKitBuilder withModelID(java.lang.String modelID)
modelID - the model idthispublic AbstractOpenKitBuilder withBeaconCacheMaxRecordAge(long maxRecordAgeInMilliseconds)
maxRecordAgeInMilliseconds - The maximum beacon record age in milliseconds, or unbounded if negative.thispublic AbstractOpenKitBuilder withBeaconCacheLowerMemoryBoundary(long lowerMemoryBoundaryInBytes)
When this is set to a positive value the memory based eviction strategy clears the collected data, until the data size in the cache falls below the configured limit.
lowerMemoryBoundaryInBytes - The lower boundary of the beacon cache or negative if unlimited.thispublic AbstractOpenKitBuilder withBeaconCacheUpperMemoryBoundary(long upperMemoryBoundaryInBytes)
When this is set to a positive value the memory based eviction strategy starts to clear data from the beacon cache when the cache size exceeds this setting.
upperMemoryBoundaryInBytes - The lower boundary of the beacon cache or negative if unlimited.thispublic AbstractOpenKitBuilder withDataCollectionLevel(DataCollectionLevel dataCollectionLevel)
Off (0) - no data collectedPERFORMANCE (1) - only performance related data is collectedUSER_BEHAVIOR (2) - all available RUM data including performance related data is collectedUSER_BEHAVIORdataCollectionLevel - Data collection level to apply.thispublic AbstractOpenKitBuilder withCrashReportingLevel(CrashReportingLevel crashReportLevel)
OFF (0) - Crashes are not sent to the serverOPT_OUT_CRASHES (1) - Crashes are not sent to the serverOPT_IN_CRASHES (2) - Crashes are sent to the serverOPT_IN_CRASHEScrashReportLevel - Flag if crash reporting is enabledthispublic OpenKit build()
OpenKit instanceOpenKit instancepublic abstract java.lang.String getOpenKitType()
The only real purpose is for logging reasons.
public abstract java.lang.String getApplicationID()
public abstract java.lang.String getApplicationName()
It depends on the concrete builder whether the application name is configurable or not.
In any case the derived classes have to return a string that is neither null nor empty.
public abstract int getDefaultServerID()
Specific OpenKit builder implementors might return a different default
server ID by overriding this method.
public java.lang.String getApplicationVersion()
withApplicationVersion(String).OpenKitConstants.DEFAULT_APPLICATION_VERSION if none
has been set.public java.lang.String getOperatingSystem()
withOperatingSystem(String).OpenKitConstants.DEFAULT_OPERATING_SYSTEM if none
has been set.public java.lang.String getManufacturer()
withManufacturer(String).OpenKitConstants.DEFAULT_MANUFACTURER if none
has been set.public java.lang.String getModelID()
withModelID(String).OpenKitConstants.DEFAULT_MODEL_ID if none
has been set.public java.lang.String getEndpointURL()
The endpoint URL is used to send beacon data to.
public long getDeviceID()
The device identifier is a unique numeric value that identifies this device or installation. The user of the OpenKit library is responsible for providing a unique value per device/installation, which stays consistent per device/installation.
public java.lang.String getOrigDeviceID()
device identifier in the representation before it was hashed (in case the
original device ID was a non numeric string).public SSLTrustManager getTrustManager()
withTrustManager(SSLTrustManager).
SSLTrustManager implementation are responsible for checking the X509 certificate chain
and rejecting untrusted/invalid certificates.
The default implementation rejects every untrusted/invalid (including self-signed) certificate.
public long getBeaconCacheMaxRecordAge()
withBeaconCacheMaxRecordAge(long).ConfigurationDefaults.DEFAULT_MAX_RECORD_AGE_IN_MILLIS if none has been set.public long getBeaconCacheLowerMemoryBoundary()
withBeaconCacheLowerMemoryBoundary(long).ConfigurationDefaults.DEFAULT_LOWER_MEMORY_BOUNDARY_IN_BYTES if none has been set.public long getBeaconCacheUpperMemoryBoundary()
withBeaconCacheUpperMemoryBoundary(long).ConfigurationDefaults.DEFAULT_UPPER_MEMORY_BOUNDARY_IN_BYTES if none has been set.public DataCollectionLevel getDataCollectionLevel()
withDataCollectionLevel(DataCollectionLevel).ConfigurationDefaults.DEFAULT_DATA_COLLECTION_LEVEL
if nothing has been set.public CrashReportingLevel getCrashReportLevel()
withCrashReportingLevel(CrashReportingLevel).ConfigurationDefaults.DEFAULT_CRASH_REPORTING_LEVEL
if nothing has been set.public Logger getLogger()
Logger that has been set with withLogger(Logger).DefaultLogger if none has been set.