Package io.aeron.cluster
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.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAs there is no instance state then this object can be used to save on allocation. -
Field Summary
Fields inherited from interface io.aeron.security.AuthorisationService
ALLOW_ALL, ALLOW_ALL_NAME, DENY_ALL, DENY_ALL_NAME -
Method Summary
Modifier and TypeMethodDescriptionbooleanisAuthorised(int protocolId, int actionId, Object type, byte[] encodedPrincipal) Checks if the client with authenticated credentials is allowed to perform an action indicated by the givenactionId.Returns the enum constant of this class with the specified name.values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
INSTANCE
As there is no instance state then this object can be used to save on allocation.
-
-
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
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 nameNullPointerException- if the argument is null
-
isAuthorised
Checks if the client with authenticated credentials is allowed to perform an action indicated by the givenactionId.- Specified by:
isAuthorisedin interfaceAuthorisationService- 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 benull. For example for an admin request in the cluster it will containAdminRequestTypevalue which denotes the exact kind of the request.encodedPrincipal- that has been authenticated.- Returns:
trueif the client is authorised to execute the action orfalseotherwise.
-