Class AutomationConfig
java.lang.Object
io.github.jspinak.brobot.config.automation.AutomationConfig
@Configuration
@ConfigurationProperties(prefix="brobot.automation")
public class AutomationConfig
extends Object
Configuration for automation execution behavior.
Controls how the framework handles automation failures and exceptions. This allows applications to continue running even when automation sequences fail, which is important for long-running services, monitoring applications, or applications that need to perform cleanup after automation failures.
Default behavior is to handle failures gracefully without terminating the application.
- Since:
- 1.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
int
Exit code to use when exitOnFailure is true and automation fails.int
Maximum number of automation retry attempts.long
Delay in milliseconds between retry attempts.int
Timeout in seconds for the entire automation sequence.int
hashCode()
boolean
Whether to continue with remaining automation steps after a failure.boolean
Whether to exit the application when automation fails.boolean
Whether to log stack traces for automation failures.boolean
Whether to throw exceptions when automation fails.void
setContinueOnFailure
(boolean continueOnFailure) Whether to continue with remaining automation steps after a failure.void
setExitOnFailure
(boolean exitOnFailure) Whether to exit the application when automation fails.void
setFailureExitCode
(int failureExitCode) Exit code to use when exitOnFailure is true and automation fails.void
setLogStackTraces
(boolean logStackTraces) Whether to log stack traces for automation failures.void
setMaxRetries
(int maxRetries) Maximum number of automation retry attempts.void
setRetryDelayMs
(long retryDelayMs) Delay in milliseconds between retry attempts.void
setThrowOnFailure
(boolean throwOnFailure) Whether to throw exceptions when automation fails.void
setTimeoutSeconds
(int timeoutSeconds) Timeout in seconds for the entire automation sequence.toString()
-
Constructor Details
-
AutomationConfig
public AutomationConfig()
-
-
Method Details
-
isExitOnFailure
public boolean isExitOnFailure()Whether to exit the application when automation fails. Default is false - application continues running after automation failure. -
getFailureExitCode
public int getFailureExitCode()Exit code to use when exitOnFailure is true and automation fails. Default is 1 (standard error exit code). -
isThrowOnFailure
public boolean isThrowOnFailure()Whether to throw exceptions when automation fails. Default is false - failures are logged but not thrown. -
isLogStackTraces
public boolean isLogStackTraces()Whether to log stack traces for automation failures. Default is true for debugging purposes. -
getMaxRetries
public int getMaxRetries()Maximum number of automation retry attempts. Default is 0 (no retries). -
getRetryDelayMs
public long getRetryDelayMs()Delay in milliseconds between retry attempts. Default is 1000ms (1 second). -
isContinueOnFailure
public boolean isContinueOnFailure()Whether to continue with remaining automation steps after a failure. Default is false - stop on first failure. -
getTimeoutSeconds
public int getTimeoutSeconds()Timeout in seconds for the entire automation sequence. Default is 0 (no timeout). -
setExitOnFailure
public void setExitOnFailure(boolean exitOnFailure) Whether to exit the application when automation fails. Default is false - application continues running after automation failure. -
setFailureExitCode
public void setFailureExitCode(int failureExitCode) Exit code to use when exitOnFailure is true and automation fails. Default is 1 (standard error exit code). -
setThrowOnFailure
public void setThrowOnFailure(boolean throwOnFailure) Whether to throw exceptions when automation fails. Default is false - failures are logged but not thrown. -
setLogStackTraces
public void setLogStackTraces(boolean logStackTraces) Whether to log stack traces for automation failures. Default is true for debugging purposes. -
setMaxRetries
public void setMaxRetries(int maxRetries) Maximum number of automation retry attempts. Default is 0 (no retries). -
setRetryDelayMs
public void setRetryDelayMs(long retryDelayMs) Delay in milliseconds between retry attempts. Default is 1000ms (1 second). -
setContinueOnFailure
public void setContinueOnFailure(boolean continueOnFailure) Whether to continue with remaining automation steps after a failure. Default is false - stop on first failure. -
setTimeoutSeconds
public void setTimeoutSeconds(int timeoutSeconds) Timeout in seconds for the entire automation sequence. Default is 0 (no timeout). -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-