Record Class SecurityOperationResult

java.lang.Object
java.lang.Record
com.loomcache.server.security.SecurityOperationResult

public record SecurityOperationResult(boolean completed, boolean denied, @Nullable MessageType responseType, byte status, @Nullable String failure) extends Record
  • Constructor Details

    • SecurityOperationResult

      public SecurityOperationResult(boolean completed, boolean denied, @Nullable MessageType responseType, byte status, @Nullable String failure)
      Creates an instance of a SecurityOperationResult record class.
      Parameters:
      completed - the value for the completed record component
      denied - the value for the denied record component
      responseType - the value for the responseType record component
      status - the value for the status record component
      failure - the value for the failure record component
  • Method Details

    • completed

      public static SecurityOperationResult completed(@Nullable Message response)
    • denied

      public static SecurityOperationResult denied(String reason)
    • failed

      public static SecurityOperationResult failed(RuntimeException failure)
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • completed

      public boolean completed()
      Returns the value of the completed record component.
      Returns:
      the value of the completed record component
    • denied

      public boolean denied()
      Returns the value of the denied record component.
      Returns:
      the value of the denied record component
    • responseType

      public @Nullable MessageType responseType()
      Returns the value of the responseType record component.
      Returns:
      the value of the responseType record component
    • status

      public byte status()
      Returns the value of the status record component.
      Returns:
      the value of the status record component
    • failure

      public @Nullable String failure()
      Returns the value of the failure record component.
      Returns:
      the value of the failure record component