com.vaadin.flow.server.dau.
Record Class DAUUtils.EnforcementResult
Record Components:
messages
- the enforcement messages or null if enforcement should not be
applied
origin
- the exception that caused the enforcement
endRequestAction
- the action to be run at the end of the request
Enclosing class:
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 a
EnforcementResult
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of the
endRequestAction
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 the
messages
record component.origin()
Returns the value of the
origin
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 a
EnforcementResult
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 with
Objects::equals(Object,Object)
. -
messages
Returns the value of the
messages
record component.Returns:
the value of the
messages
record component -
origin
Returns the value of the
origin
record component.Returns:
the value of the
origin
record component -
endRequestAction
Returns the value of the
endRequestAction
record component.Returns:
the value of the
endRequestAction
record component
-