Package org.apache.sling.testing.clients
Class SystemPropertiesConfig
java.lang.Object
org.apache.sling.testing.clients.SystemPropertiesConfig
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
System property forgetClientUserAgentName()
Prefixed byCONFIG_PROP_PREFIX
static final String
System property forisClientUserAgentUsingVersion()
Prefixed byCONFIG_PROP_PREFIX
static final String
Prefix for IT-specific system propertiesstatic final String
System property forgetHttpDelay()
Prefixed byCONFIG_PROP_PREFIX
static final String
System property forisHttpLogRetries()
Prefixed byCONFIG_PROP_PREFIX
static final String
System property forgetHttpRetriesDelay()
Prefixed byCONFIG_PROP_PREFIX
static final String
System property forgetHttpRetriesErrorCodes()
Prefixed byCONFIG_PROP_PREFIX
static final String
System property forgetHttpRetries()
Prefixed byCONFIG_PROP_PREFIX
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
Returns the default user-agent name of theSlingClient
static String
Returns the fully constructed default user-agent from system propertiesstatic long
Custom delay in milliseconds before an HTTP request goes through.static int
Number of http call retries in case of a 5XX response codestatic int
The delay in milliseconds between http retriesstatic Collection<Integer>
Comma-separated list of http response codes for which to retry the request If empty, all 5XX error codes will be retriedstatic String
static boolean
Whether the user-agent of theSlingClient
should be appended by the current library versionstatic boolean
Whether to log or not http request retries
-
Field Details
-
CONFIG_PROP_PREFIX
Prefix for IT-specific system properties- See Also:
-
HTTP_DELAY_PROP
System property forgetHttpDelay()
Prefixed byCONFIG_PROP_PREFIX
- See Also:
-
HTTP_RETRIES_PROP
System property forgetHttpRetries()
Prefixed byCONFIG_PROP_PREFIX
- See Also:
-
HTTP_RETRIES_DELAY_PROP
System property forgetHttpRetriesDelay()
Prefixed byCONFIG_PROP_PREFIX
- See Also:
-
HTTP_LOG_RETRIES_PROP
System property forisHttpLogRetries()
Prefixed byCONFIG_PROP_PREFIX
- See Also:
-
HTTP_RETRIES_ERROR_CODES_PROP
System property forgetHttpRetriesErrorCodes()
Prefixed byCONFIG_PROP_PREFIX
- See Also:
-
CLIENT_USERAGENT_NAME
System property forgetClientUserAgentName()
Prefixed byCONFIG_PROP_PREFIX
- See Also:
-
CLIENT_USERAGENT_USEVERSION
System property forisClientUserAgentUsingVersion()
Prefixed byCONFIG_PROP_PREFIX
- See Also:
-
-
Constructor Details
-
SystemPropertiesConfig
public SystemPropertiesConfig()
-
-
Method Details
-
getPrefixedPropertyName
-
getHttpDelay
public static long getHttpDelay()Custom delay in milliseconds before an HTTP request goes through. Used byDelayRequestInterceptor
- Returns:
- the delay in muliseconds
-
getHttpRetries
public static int getHttpRetries()Number of http call retries in case of a 5XX response code- Returns:
- the number of retries to be made
-
getHttpRetriesDelay
public static int getHttpRetriesDelay()The delay in milliseconds between http retries- Returns:
- the delay between http retries
-
isHttpLogRetries
public static boolean isHttpLogRetries()Whether to log or not http request retries- Returns:
- true if retries should be logged
-
getHttpRetriesErrorCodes
Comma-separated list of http response codes for which to retry the request If empty, all 5XX error codes will be retried- Returns:
- a non-null collection with the http resonse codes
-
getClientUserAgentName
Returns the default user-agent name of theSlingClient
- Returns:
- default name
-
isClientUserAgentUsingVersion
public static boolean isClientUserAgentUsingVersion()Whether the user-agent of theSlingClient
should be appended by the current library version- Returns:
- true if version should be appended
-
getDefaultUserAgent
Returns the fully constructed default user-agent from system properties- Returns:
- default user-agent
-