Record Class AbuseDecision.Block
java.lang.Object
java.lang.Record
com.svenruppert.jsentinel.credential.abuse.AbuseDecision.Block
- All Implemented Interfaces:
AbuseDecision
- Enclosing interface:
AbuseDecision
public static record AbuseDecision.Block(Duration retryAfter, AbuseDimension dimension)
extends Record
implements AbuseDecision
Refuse the attempt. The caller surfaces a generic public failure;
retryAfter is internal metadata for the audit trail.-
Nested Class Summary
Nested classes/interfaces inherited from interface AbuseDecision
AbuseDecision.Allow, AbuseDecision.Block, AbuseDecision.Delay, AbuseDecision.RequireAdditionalCheckModifier and TypeInterfaceDescriptionstatic final recordThe attempt may proceed unconditionally.static final recordRefuse the attempt.static final recordHonour the attempt but pause fordelayfirst — a soft brake that slows automated scanners without locking the user out.static final recordRequire step-up authentication / captcha / additional check before the attempt may proceed. -
Constructor Summary
ConstructorsConstructorDescriptionBlock(Duration retryAfter, AbuseDimension dimension) Creates an instance of aBlockrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedimensionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theretryAfterrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Block
Creates an instance of aBlockrecord class.- Parameters:
retryAfter- the value for theretryAfterrecord componentdimension- the value for thedimensionrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
retryAfter
Returns the value of theretryAfterrecord component.- Returns:
- the value of the
retryAfterrecord component
-
dimension
Returns the value of thedimensionrecord component.- Returns:
- the value of the
dimensionrecord component
-