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 booleanbooleanintExit code to use when exitOnFailure is true and automation fails.intMaximum number of automation retry attempts.longDelay in milliseconds between retry attempts.intTimeout in seconds for the entire automation sequence.inthashCode()booleanWhether to continue with remaining automation steps after a failure.booleanWhether to exit the application when automation fails.booleanWhether to log stack traces for automation failures.booleanWhether to throw exceptions when automation fails.voidsetContinueOnFailure(boolean continueOnFailure) Whether to continue with remaining automation steps after a failure.voidsetExitOnFailure(boolean exitOnFailure) Whether to exit the application when automation fails.voidsetFailureExitCode(int failureExitCode) Exit code to use when exitOnFailure is true and automation fails.voidsetLogStackTraces(boolean logStackTraces) Whether to log stack traces for automation failures.voidsetMaxRetries(int maxRetries) Maximum number of automation retry attempts.voidsetRetryDelayMs(long retryDelayMs) Delay in milliseconds between retry attempts.voidsetThrowOnFailure(boolean throwOnFailure) Whether to throw exceptions when automation fails.voidsetTimeoutSeconds(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
-