Class ServerConfiguration
- java.lang.Object
-
- com.dynatrace.openkit.core.configuration.ServerConfiguration
-
public class ServerConfiguration extends java.lang.ObjectConfiguration class storing all configuration parameters as returned by Dynatrace.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classServerConfiguration.BuilderBuilder class for creating a custom instance ofServerConfiguration.
-
Field Summary
Fields Modifier and Type Field Description static ServerConfigurationDEFAULTDefault server configuration
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ServerConfigurationfrom(ResponseAttributes responseAttributes)Creates a new server configuration from the givenResponseAttributesintgetBeaconSizeInBytes()Get the maximum beacon size, that is the post body, in bytes.intgetMaxEventsPerSession()Returns the maximum number of events after which a session is to be split.intgetMaxSessionDurationInMilliseconds()Returns the maximum duration in milliseconds after which a session is to be split.intgetMultiplicity()Get multiplicity value.intgetSendIntervalInMilliseconds()Returns the send interval in milliseconds.intgetServerID()Get the server's id to communicate with.intgetSessionTimeoutInMilliseconds()Returns the idle timeout after which a session is to be split.intgetTrafficControlPercentage()Returns a percentage value that is used for session rate limiting.intgetVisitStoreVersion()Returns the version of the visit store that should be used.booleanisCaptureEnabled()Get a boolean indicating whether capturing is enabled in Dynatrace or not.booleanisCrashReportingEnabled()Get a boolean indicating whether crash reporting is enabled in Dynatrace or not.booleanisErrorReportingEnabled()Get a boolean indicating whether error reporting is enabled in Dynatrace or not.booleanisSendingCrashesAllowed()Get a boolean indicating whether sending crashes to the server is allowed or not.booleanisSendingDataAllowed()Get a boolean indicating whether sending arbitrary data to the server is allowed or not.booleanisSendingErrorsAllowed()Get a boolean indicating whether sending errors to the server is allowed or not.booleanisSessionSplitByEventsEnabled()Returnstrueif session splitting when exceeding the maximum number of events is enabled,falseotherwise.booleanisSessionSplitByIdleTimeoutEnabled()Returnstrueif session splitting by exceeding the idle timeout is enabled,falseotherwise.booleanisSessionSplitBySessionDurationEnabled()Returnstrueif session splitting when exceeding the maximum session duration is enabled,falseotherwise.ServerConfigurationmerge(ServerConfiguration other)Merges givenotherwiththisinstance and return the merged instance.
-
-
-
Field Detail
-
DEFAULT
public static final ServerConfiguration DEFAULT
Default server configuration
-
-
Method Detail
-
from
public static ServerConfiguration from(ResponseAttributes responseAttributes)
Creates a new server configuration from the givenResponseAttributes- Parameters:
responseAttributes- the response attributes from which to create the server configuration.- Returns:
- the newly created server configuration.
-
isCaptureEnabled
public boolean isCaptureEnabled()
Get a boolean indicating whether capturing is enabled in Dynatrace or not.- Returns:
trueif capturing is enabled,falseotherwise.
-
isCrashReportingEnabled
public boolean isCrashReportingEnabled()
Get a boolean indicating whether crash reporting is enabled in Dynatrace or not.- Returns:
trueif crash reporting is enabled,falseotherwise.
-
isErrorReportingEnabled
public boolean isErrorReportingEnabled()
Get a boolean indicating whether error reporting is enabled in Dynatrace or not.- Returns:
trueif error reporting is enabled,falseotherwise.
-
getServerID
public int getServerID()
Get the server's id to communicate with.- Returns:
- Server ID to communicate with
-
getBeaconSizeInBytes
public int getBeaconSizeInBytes()
Get the maximum beacon size, that is the post body, in bytes.- Returns:
- Maximum beacon size in bytes.
-
getMultiplicity
public int getMultiplicity()
Get multiplicity value.Multiplicity is a factor on the server side, which is greater than 1 to prevent overload situations. This value comes from the server and has to be sent back to the server.
- Returns:
- Multiplicity factor
-
getSendIntervalInMilliseconds
public int getSendIntervalInMilliseconds()
Returns the send interval in milliseconds.- Returns:
- send interval in milliseconds.
-
getMaxSessionDurationInMilliseconds
public int getMaxSessionDurationInMilliseconds()
Returns the maximum duration in milliseconds after which a session is to be split.- Returns:
- the maximum duration of a session in milliseconds.
-
isSessionSplitBySessionDurationEnabled
public boolean isSessionSplitBySessionDurationEnabled()
Returnstrueif session splitting when exceeding the maximum session duration is enabled,falseotherwise.
-
getMaxEventsPerSession
public int getMaxEventsPerSession()
Returns the maximum number of events after which a session is to be split.- Returns:
- the maximum number of top level actions per session.
-
isSessionSplitByEventsEnabled
public boolean isSessionSplitByEventsEnabled()
Returnstrueif session splitting when exceeding the maximum number of events is enabled,falseotherwise.
-
getSessionTimeoutInMilliseconds
public int getSessionTimeoutInMilliseconds()
Returns the idle timeout after which a session is to be split.- Returns:
- the idle timeout of a session.
-
isSessionSplitByIdleTimeoutEnabled
public boolean isSessionSplitByIdleTimeoutEnabled()
Returnstrueif session splitting by exceeding the idle timeout is enabled,falseotherwise.
-
getVisitStoreVersion
public int getVisitStoreVersion()
Returns the version of the visit store that should be used.- Returns:
- version of the visit store.
-
getTrafficControlPercentage
public int getTrafficControlPercentage()
Returns a percentage value that is used for session rate limiting.- Returns:
- percentage of sessions to be captured.
-
isSendingDataAllowed
public boolean isSendingDataAllowed()
Get a boolean indicating whether sending arbitrary data to the server is allowed or not.Sending data is only allowed if all of the following conditions evaluate to true. *
isCaptureEnabled()istrue*getMultiplicity()is greater than0To check if sending errors is allowed, useisSendingErrorsAllowed(). To check if sending crashes is allowed, useisSendingCrashesAllowed().- Returns:
trueif data sending is allowed,falseotherwise.
-
isSendingCrashesAllowed
public boolean isSendingCrashesAllowed()
Get a boolean indicating whether sending crashes to the server is allowed or not.Sending crashes is only allowed if all of the following conditions evaluate to true. *
isSendingDataAllowed()yieldstrue*isCrashReportingEnabled()istrue- Returns:
trueif sending crashes is allowed,falseotherwise.
-
isSendingErrorsAllowed
public boolean isSendingErrorsAllowed()
Get a boolean indicating whether sending errors to the server is allowed or not.Sending errors is only allowed if all of the following conditions evaluate to true. *
isSendingDataAllowed()yieldstrue*isErrorReportingEnabled()istrue- Returns:
trueif sending errors is allowed,falseotherwise.
-
merge
public ServerConfiguration merge(ServerConfiguration other)
Merges givenotherwiththisinstance and return the merged instance.Most fields are taken from
other, except for the following which do not change:- Parameters:
other- The other instance to merge with.- Returns:
- New
ServerConfigurationinstance with merged values.
-
-