Class ServerConfiguration.Builder
- java.lang.Object
-
- com.dynatrace.openkit.core.configuration.ServerConfiguration.Builder
-
- Enclosing class:
- ServerConfiguration
public static final class ServerConfiguration.Builder extends java.lang.ObjectBuilder class for creating a custom instance ofServerConfiguration.
-
-
Constructor Summary
Constructors Constructor Description Builder(ServerConfiguration serverConfiguration)Construct and initialize fields from givenServerConfiguration.Builder(ResponseAttributes responseAttributes)Construct and initialize fields from givenResponseAttributes.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ServerConfigurationbuild()Build theServerConfigurationand return the new instance.ServerConfiguration.BuilderwithBeaconSizeInBytes(int beaconSizeInBytes)Configures the beacon size in Bytes.ServerConfiguration.BuilderwithCapture(boolean captureState)Enables/disables capturing by settingServerConfiguration.isCaptureEnabled()to the corresponding value.ServerConfiguration.BuilderwithCrashReporting(boolean crashReportingState)Enables/disables crash reporting by settingServerConfiguration.isCrashReportingEnabled()to the corresponding value.ServerConfiguration.BuilderwithErrorReporting(boolean errorReportingState)Enables/disables error reporting by settingServerConfiguration.isErrorReportingEnabled()to the corresponding value.ServerConfiguration.BuilderwithMaxEventsPerSession(int maxEventsPerSession)Configures the maximum number of events per session, after which the session gets split.ServerConfiguration.BuilderwithMaxSessionDurationInMilliseconds(int maxSessionDurationInMillis)Configures the maximum duration of a session, after which the session gets split.ServerConfiguration.BuilderwithMultiplicity(int multiplicity)Configures the multiplicity factor.ServerConfiguration.BuilderwithSendIntervalInMilliseconds(int sendIntervalInMilliseconds)Configure the send interval in milliseconds.ServerConfiguration.BuilderwithServerID(int serverID)Configures the server ID.ServerConfiguration.BuilderwithSessionTimeoutInMilliseconds(int sessionTimeoutInMilliseconds)Configures the idle timeout after which a session gets split.ServerConfiguration.BuilderwithTrafficControlPercentage(int trafficControlPercentage)Configures the traffic control/cost control percentage.ServerConfiguration.BuilderwithVisitStoreVersion(int visitStoreVersion)Configures the version of the visit store that should be used.
-
-
-
Constructor Detail
-
Builder
public Builder(ResponseAttributes responseAttributes)
Construct and initialize fields from givenResponseAttributes.- Parameters:
responseAttributes- the attributes received as a response from the server.
-
Builder
public Builder(ServerConfiguration serverConfiguration)
Construct and initialize fields from givenServerConfiguration.
-
-
Method Detail
-
withCapture
public ServerConfiguration.Builder withCapture(boolean captureState)
Enables/disables capturing by settingServerConfiguration.isCaptureEnabled()to the corresponding value.- Returns:
this
-
withCrashReporting
public ServerConfiguration.Builder withCrashReporting(boolean crashReportingState)
Enables/disables crash reporting by settingServerConfiguration.isCrashReportingEnabled()to the corresponding value.- Returns:
this
-
withErrorReporting
public ServerConfiguration.Builder withErrorReporting(boolean errorReportingState)
Enables/disables error reporting by settingServerConfiguration.isErrorReportingEnabled()to the corresponding value.- Returns:
this
-
withServerID
public ServerConfiguration.Builder withServerID(int serverID)
Configures the server ID.- Parameters:
serverID- The server ID to communicate with.- Returns:
this
-
withBeaconSizeInBytes
public ServerConfiguration.Builder withBeaconSizeInBytes(int beaconSizeInBytes)
Configures the beacon size in Bytes.- Parameters:
beaconSizeInBytes- Maximum allowed beacon size in bytes.- Returns:
this
-
withMultiplicity
public ServerConfiguration.Builder withMultiplicity(int multiplicity)
Configures the multiplicity factor.- Parameters:
multiplicity- Multiplicity factor.- Returns:
this
-
withSendIntervalInMilliseconds
public ServerConfiguration.Builder withSendIntervalInMilliseconds(int sendIntervalInMilliseconds)
Configure the send interval in milliseconds.- Parameters:
sendIntervalInMilliseconds- Send interval in milliseconds- Returns:
this
-
withMaxSessionDurationInMilliseconds
public ServerConfiguration.Builder withMaxSessionDurationInMilliseconds(int maxSessionDurationInMillis)
Configures the maximum duration of a session, after which the session gets split.- Parameters:
maxSessionDurationInMillis- the maximum duration of a session in milliseconds- Returns:
this
-
withMaxEventsPerSession
public ServerConfiguration.Builder withMaxEventsPerSession(int maxEventsPerSession)
Configures the maximum number of events per session, after which the session gets split.- Parameters:
maxEventsPerSession- the maximum number of top level actions after which a session gets split.- Returns:
this
-
withSessionTimeoutInMilliseconds
public ServerConfiguration.Builder withSessionTimeoutInMilliseconds(int sessionTimeoutInMilliseconds)
Configures the idle timeout after which a session gets split.- Parameters:
sessionTimeoutInMilliseconds- the idle timeout in milliseconds after which a session gets split.- Returns:
this
-
withVisitStoreVersion
public ServerConfiguration.Builder withVisitStoreVersion(int visitStoreVersion)
Configures the version of the visit store that should be used.- Parameters:
visitStoreVersion- the version of the visit store to be used.- Returns:
this
-
withTrafficControlPercentage
public ServerConfiguration.Builder withTrafficControlPercentage(int trafficControlPercentage)
Configures the traffic control/cost control percentage.This value is used as rate limit to limit the number of sessions being captured.
- Parameters:
trafficControlPercentage- Percentage of sessions being captured.- Returns:
this
-
build
public ServerConfiguration build()
Build theServerConfigurationand return the new instance.- Returns:
- Newly created
ServerConfigurationinstance.
-
-