Package com.mendix.core.actionmanagement
Interface UserActionCallBuilder
-
- All Superinterfaces:
ActionCallBuilder
public interface UserActionCallBuilder extends ActionCallBuilder
Provides a builder for building a user action call. The builder can be used to add arguments and eventually call the user action.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description UserActionCallBuilderwithExponentialRetry(int numberOfAttempts, java.time.Duration initialInterval)Performs the specified number of retries if the execution of the action fails with an exception.UserActionCallBuilderwithExponentialRetry(int numberOfAttempts, java.time.Duration initialInterval, java.time.Duration maximumInterval)Performs the specified number of retries if the execution of the action fails with an exception.UserActionCallBuilderwithParams(java.lang.Object... params)Sets the parameters that will be used to create the user action.UserActionCallBuilderwithRetry(int numberOfAttempts, java.time.Duration interval)Performs the specified number of retries if the execution of the action fails with an exception.-
Methods inherited from interface com.mendix.core.actionmanagement.ActionCallBuilder
execute, executeInBackground, executeInBackground
-
-
-
-
Method Detail
-
withParams
UserActionCallBuilder withParams(java.lang.Object... params)
Sets the parameters that will be used to create the user action.There are two ways of using this method:
-
Provide exactly the constructor parameters of the
UserActionthat is to be called. For example for theMyCustomActionhas a constructorpublic MyCustomAction(IContext context, Integer param>)then it can be called with all those parameter, e.g.....withParams(context, 23). -
Provide all except context parameter of the constructor of the
UserActionthat is to be called. In the above example that would mean....withParams(23).
Only parameters of the exact typeIContextcan be omitted. If oneIContextparameter is omitted all parameters of that type have to be omitted.
All parameters have to be specified at once, subsequent calls override earlier calls.
- Parameters:
params- the parameters to set
-
Provide exactly the constructor parameters of the
-
withRetry
UserActionCallBuilder withRetry(int numberOfAttempts, java.time.Duration interval)
Description copied from interface:ActionCallBuilderPerforms the specified number of retries if the execution of the action fails with an exception. A fixed delay is used in between the retries. This setting only applies to actions that are executed as a background task.- Specified by:
withRetryin interfaceActionCallBuilder- Parameters:
numberOfAttempts- the maximum number of times to retryinterval- the time to wait in between attempts- Returns:
- the updated builder
-
withExponentialRetry
UserActionCallBuilder withExponentialRetry(int numberOfAttempts, java.time.Duration initialInterval)
Description copied from interface:ActionCallBuilderPerforms the specified number of retries if the execution of the action fails with an exception. An exponentially increasing delay is used in between the retries. The interval doubles each time, up to a maximum of 1 day. This setting only applies to actions that are executed as a background task.- Specified by:
withExponentialRetryin interfaceActionCallBuilder- Parameters:
numberOfAttempts- the maximum number of times to retryinitialInterval- the time to wait before the first retry- Returns:
- the updated builder
-
withExponentialRetry
UserActionCallBuilder withExponentialRetry(int numberOfAttempts, java.time.Duration initialInterval, java.time.Duration maximumInterval)
Description copied from interface:ActionCallBuilderPerforms the specified number of retries if the execution of the action fails with an exception. An exponentially increasing delay is used in between the retries. The interval doubles each time, up to the specified maximum. This setting only applies to actions that are executed as a background task.- Specified by:
withExponentialRetryin interfaceActionCallBuilder- Parameters:
numberOfAttempts- the maximum number of times to retryinitialInterval- the time to wait before the first retrymaximumInterval- the maximum time to wait in between attempts- Returns:
- the updated builder
-
-