Package com.dynatrace.openkit.protocol
Class ResponseAttributesImpl
- java.lang.Object
-
- com.dynatrace.openkit.protocol.ResponseAttributesImpl
-
- All Implemented Interfaces:
ResponseAttributes
public class ResponseAttributesImpl extends java.lang.Object implements ResponseAttributes
ImplementsResponseAttributesproviding all the attributes received from the server.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classResponseAttributesImpl.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetApplicationId()Returns the ID of the application to which this configuration applies.intgetMaxBeaconSizeInBytes()Returns the maximum POST body size when sending beacons.intgetMaxEventsPerSession()Returns the maximum number of top level actions after which a session will be split.intgetMaxSessionDurationInMilliseconds()Returns the maximum duration of a session in milliseconds after which a session will be split.intgetMultiplicity()Returns the multiplicityintgetSendIntervalInMilliseconds()Returns the send interval in milliseconds.intgetServerId()Returns the ID of the server to where all data should be sent.intgetSessionTimeoutInMilliseconds()Returns the idle timeout in milliseconds after which a session will be split.java.lang.StringgetStatus()Returns the status of the new session configuration request.longgetTimestampInMilliseconds()Returns the timestamp of these attributes which were returned from the server.intgetTrafficControlPercentage()Gets a session sampling in percent.intgetVisitStoreVersion()Returns the version of the visit store to be used.booleanisAttributeSet(ResponseAttribute attribute)Checks whether the given attribute was set / sent from the server with this server response.booleanisCapture()Indicator whether capturing data is generally allowed or not.booleanisCaptureCrashes()Indicator whether crashes should be captured or not.booleanisCaptureErrors()Indicator whether errors should be captured or not.ResponseAttributesmerge(ResponseAttributes responseAttributes)Creates a new response attributes object by merging the given response into this one.static ResponseAttributesImpl.BuilderwithJsonDefaults()Creates a new builder initialized with the default values forJSON parsing.static ResponseAttributesImpl.BuilderwithKeyValueDefaults()Creates a new builder initialized with the defaults value forkey-value parsing.static ResponseAttributesImpl.BuilderwithUndefinedDefaults()Creates a new builder instance with undefined default values.
-
-
-
Method Detail
-
getMaxBeaconSizeInBytes
public int getMaxBeaconSizeInBytes()
Description copied from interface:ResponseAttributesReturns the maximum POST body size when sending beacons.- Specified by:
getMaxBeaconSizeInBytesin interfaceResponseAttributes
-
getMaxSessionDurationInMilliseconds
public int getMaxSessionDurationInMilliseconds()
Description copied from interface:ResponseAttributesReturns the maximum duration of a session in milliseconds after which a session will be split.- Specified by:
getMaxSessionDurationInMillisecondsin interfaceResponseAttributes
-
getMaxEventsPerSession
public int getMaxEventsPerSession()
Description copied from interface:ResponseAttributesReturns the maximum number of top level actions after which a session will be split.- Specified by:
getMaxEventsPerSessionin interfaceResponseAttributes
-
getSessionTimeoutInMilliseconds
public int getSessionTimeoutInMilliseconds()
Description copied from interface:ResponseAttributesReturns the idle timeout in milliseconds after which a session will be split.- Specified by:
getSessionTimeoutInMillisecondsin interfaceResponseAttributes
-
getSendIntervalInMilliseconds
public int getSendIntervalInMilliseconds()
Description copied from interface:ResponseAttributesReturns the send interval in milliseconds.- Specified by:
getSendIntervalInMillisecondsin interfaceResponseAttributes
-
getVisitStoreVersion
public int getVisitStoreVersion()
Description copied from interface:ResponseAttributesReturns the version of the visit store to be used.- Specified by:
getVisitStoreVersionin interfaceResponseAttributes
-
isCapture
public boolean isCapture()
Description copied from interface:ResponseAttributesIndicator whether capturing data is generally allowed or not.- Specified by:
isCapturein interfaceResponseAttributes
-
isCaptureCrashes
public boolean isCaptureCrashes()
Description copied from interface:ResponseAttributesIndicator whether crashes should be captured or not.- Specified by:
isCaptureCrashesin interfaceResponseAttributes
-
isCaptureErrors
public boolean isCaptureErrors()
Description copied from interface:ResponseAttributesIndicator whether errors should be captured or not.- Specified by:
isCaptureErrorsin interfaceResponseAttributes
-
getTrafficControlPercentage
public int getTrafficControlPercentage()
Description copied from interface:ResponseAttributesGets a session sampling in percent.Value returned here is configured per application as Cost Control.
- Specified by:
getTrafficControlPercentagein interfaceResponseAttributes- Returns:
- traffic control/cost control percentage in range [1, 100].
-
getApplicationId
public java.lang.String getApplicationId()
Description copied from interface:ResponseAttributesReturns the ID of the application to which this configuration applies.This is sent by the JSON configuration only, as sanity check to fix a weird Jetty bug.
- Specified by:
getApplicationIdin interfaceResponseAttributes
-
getMultiplicity
public int getMultiplicity()
Description copied from interface:ResponseAttributesReturns the multiplicity- Specified by:
getMultiplicityin interfaceResponseAttributes
-
getServerId
public int getServerId()
Description copied from interface:ResponseAttributesReturns the ID of the server to where all data should be sent.- Specified by:
getServerIdin interfaceResponseAttributes
-
getStatus
public java.lang.String getStatus()
Description copied from interface:ResponseAttributesReturns the status of the new session configuration request.- Specified by:
getStatusin interfaceResponseAttributes
-
getTimestampInMilliseconds
public long getTimestampInMilliseconds()
Description copied from interface:ResponseAttributesReturns the timestamp of these attributes which were returned from the server.The timestamp is the duration from January, 1st, 1970
- Specified by:
getTimestampInMillisecondsin interfaceResponseAttributes
-
isAttributeSet
public boolean isAttributeSet(ResponseAttribute attribute)
Description copied from interface:ResponseAttributesChecks whether the given attribute was set / sent from the server with this server response.- Specified by:
isAttributeSetin interfaceResponseAttributes- Parameters:
attribute- the attribute to be checked if it was sent by the server.- Returns:
trueif the given attribute was sent from the server with this attributes,falseotherwise.
-
merge
public ResponseAttributes merge(ResponseAttributes responseAttributes)
Description copied from interface:ResponseAttributesCreates a new response attributes object by merging the given response into this one. Single attributes are selectively taken over from the given attributes as long as the respective attributeis set.- Specified by:
mergein interfaceResponseAttributes- Parameters:
responseAttributes- the response attributes which will be merged together with this one into a new response attributes object.- Returns:
- a new response attributes instance by merging the given attributes with this attributes.
-
withKeyValueDefaults
public static ResponseAttributesImpl.Builder withKeyValueDefaults()
Creates a new builder initialized with the defaults value forkey-value parsing.
-
withJsonDefaults
public static ResponseAttributesImpl.Builder withJsonDefaults()
Creates a new builder initialized with the default values forJSON parsing.
-
withUndefinedDefaults
public static ResponseAttributesImpl.Builder withUndefinedDefaults()
Creates a new builder instance with undefined default values.
-
-