Enum Class AllowBackupAndStandbyAuthorisationService

java.lang.Object
java.lang.Enum<AllowBackupAndStandbyAuthorisationService>
io.aeron.cluster.AllowBackupAndStandbyAuthorisationService
All Implemented Interfaces:
AuthorisationService, Serializable, Comparable<AllowBackupAndStandbyAuthorisationService>, Constable

public enum AllowBackupAndStandbyAuthorisationService extends Enum<AllowBackupAndStandbyAuthorisationService> implements AuthorisationService
An AuthorisationService that allows the actions required by Cluster Backup and Aeron Cluster Standby.
  • Enum Constant Details

  • Method Details

    • values

      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static AllowBackupAndStandbyAuthorisationService valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • isAuthorised

      public boolean isAuthorised(int protocolId, int actionId, Object type, byte[] encodedPrincipal)
      Checks if the client with authenticated credentials is allowed to perform an action indicated by the given actionId.
      Specified by:
      isAuthorised in interface AuthorisationService
      Parameters:
      protocolId - of the protocol to which the action belongs, e.g. a SBE schema id.
      actionId - of the command being checked, e.g. a SBE message template id.
      type - optional type for the action being checked, may be null. For example for an admin request in the cluster it will contain AdminRequestType value which denotes the exact kind of the request.
      encodedPrincipal - that has been authenticated.
      Returns:
      true if the client is authorised to execute the action or false otherwise.