Package com.vaadin.flow.server.dau
Record Class DAUUtils.EnforcementResult
java.lang.Object
java.lang.Record
com.vaadin.flow.server.dau.DAUUtils.EnforcementResult
- Record Components:
messages
- the enforcement messages or null if enforcement should not be appliedorigin
- the exception that caused the enforcementendRequestAction
- the action to be run at the end of the request
- Enclosing class:
- DAUUtils
public static record DAUUtils.EnforcementResult(EnforcementNotificationMessages messages, RuntimeException origin, Runnable endRequestAction)
extends Record
Record to hold the DAU enforcement check result with the messages and the
action to be run at the end of the request.
-
Constructor Summary
ConstructorsConstructorDescriptionEnforcementResult
(EnforcementNotificationMessages messages, RuntimeException origin, Runnable endRequestAction) Creates an instance of aEnforcementResult
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theendRequestAction
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.boolean
messages()
Returns the value of themessages
record component.origin()
Returns the value of theorigin
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
EnforcementResult
public EnforcementResult(EnforcementNotificationMessages messages, RuntimeException origin, Runnable endRequestAction) Creates an instance of aEnforcementResult
record class.- Parameters:
messages
- the value for themessages
record componentorigin
- the value for theorigin
record componentendRequestAction
- the value for theendRequestAction
record component
-
-
Method Details
-
isEnforcementNeeded
public boolean isEnforcementNeeded() -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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)
. -
messages
Returns the value of themessages
record component.- Returns:
- the value of the
messages
record component
-
origin
Returns the value of theorigin
record component.- Returns:
- the value of the
origin
record component
-
endRequestAction
Returns the value of theendRequestAction
record component.- Returns:
- the value of the
endRequestAction
record component
-