
public.javadoc.org.spincast.plugins.attemptslimiter.AttemptDefault.html Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spincast-website Show documentation
Show all versions of spincast-website Show documentation
Source code for the https://www.spincast.org website.
AttemptDefault (org.spincast:spincast-framework 2.1.1 API)
Class AttemptDefault
java.lang.Object
org.spincast.plugins.attemptslimiter.AttemptDefault
- All Implemented Interfaces:
Attempt
-
Constructor Summary
Constructors
Constructor
Description
AttemptDefault(SpincastAttemptsLimiterPluginRepository spincastAttemptsLimiterPlguinRepository,
SpincastAttemptsLimiterPluginConfig spincastAttemptsLimiterPluginConfig,
boolean maxReached,
String actionName,
AttemptCriteria... criterias)
-
Method Summary
Modifier and Type
Method
Description
void
Deletes all attempts for this action and criterias.
protected SpincastAttemptsLimiterPluginConfig
protected SpincastAttemptsLimiterPluginRepository
void
Increments the number of attempts.
boolean
Max number of attempts reached.
toString()
-
Constructor Details
-
AttemptDefault
public AttemptDefault(SpincastAttemptsLimiterPluginRepository spincastAttemptsLimiterPlguinRepository,
SpincastAttemptsLimiterPluginConfig spincastAttemptsLimiterPluginConfig,
boolean maxReached,
String actionName,
AttemptCriteria... criterias)
-
Method Details
-
getSpincastAttemptsLimiterPluginRepository
-
getSpincastAttemptsLimiterPluginConfig
-
getActionName
-
getCriterias
-
isMaxReached
public boolean isMaxReached()
Description copied from interface: Attempt
Max number of attempts reached. Your
code should deny the protected action.
- Specified by:
isMaxReached
in interface Attempt
-
incrementAttemptsCount
public void incrementAttemptsCount()
Description copied from interface: Attempt
Increments the number of attempts.
You have to call this method manually if
you don't let the AttemptsManager.attempt(String, org.spincast.plugins.attemptslimiter.AttemptCriteria...)
method do it.
Note that calling this method multiple times won't result in
multiple increments. The count will be incremented only once!
- Specified by:
incrementAttemptsCount
in interface Attempt
-
deleteAttempts
public void deleteAttempts()
Description copied from interface: Attempt
Deletes all attempts for this action and criterias.
In some situations, you may want to clear the attempts
when an action is succesfull.
- Specified by:
deleteAttempts
in interface Attempt
-
toString
© 2015 - 2025 Weber Informatics LLC | Privacy Policy