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 aEnforcementResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theendRequestActionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanmessages()Returns the value of themessagesrecord component.origin()Returns the value of theoriginrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
EnforcementResult
public EnforcementResult(EnforcementNotificationMessages messages, RuntimeException origin, Runnable endRequestAction) Creates an instance of aEnforcementResultrecord class.- Parameters:
messages- the value for themessagesrecord componentorigin- the value for theoriginrecord componentendRequestAction- the value for theendRequestActionrecord 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 themessagesrecord component.- Returns:
- the value of the
messagesrecord component
-
origin
Returns the value of theoriginrecord component.- Returns:
- the value of the
originrecord component
-
endRequestAction
Returns the value of theendRequestActionrecord component.- Returns:
- the value of the
endRequestActionrecord component
-