Record Class SecurityOperationContext
java.lang.Object
java.lang.Record
com.loomcache.server.security.SecurityOperationContext
public record SecurityOperationContext(String connectionId, String username, Role role, MessageType messageType, AuthConfig.PermissionRequest permissionRequest, @Nullable String resourceName, byte[] key, int valueLength)
extends Record
Immutable operation metadata exposed to
SecurityInterceptor instances.-
Constructor Summary
ConstructorsConstructorDescriptionSecurityOperationContext(String connectionId, String username, Role role, MessageType messageType, AuthConfig.PermissionRequest permissionRequest, @Nullable String resourceName, byte[] key, int valueLength) Creates an instance of aSecurityOperationContextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theconnectionIdrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.byte[]key()Returns the value of thekeyrecord component.Returns the value of themessageTyperecord component.Returns the value of thepermissionRequestrecord component.@Nullable StringReturns the value of theresourceNamerecord component.role()Returns the value of therolerecord component.final StringtoString()Returns a string representation of this record class.username()Returns the value of theusernamerecord component.intReturns the value of thevalueLengthrecord component.
-
Constructor Details
-
SecurityOperationContext
public SecurityOperationContext(String connectionId, String username, Role role, MessageType messageType, AuthConfig.PermissionRequest permissionRequest, @Nullable String resourceName, byte[] key, int valueLength) Creates an instance of aSecurityOperationContextrecord class.- Parameters:
connectionId- the value for theconnectionIdrecord componentusername- the value for theusernamerecord componentrole- the value for therolerecord componentmessageType- the value for themessageTyperecord componentpermissionRequest- the value for thepermissionRequestrecord componentresourceName- the value for theresourceNamerecord componentkey- the value for thekeyrecord componentvalueLength- the value for thevalueLengthrecord component
-
-
Method Details
-
key
public byte[] key()Returns the value of thekeyrecord component.- Returns:
- the value of the
keyrecord component
-
toString
-
hashCode
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
connectionId
Returns the value of theconnectionIdrecord component.- Returns:
- the value of the
connectionIdrecord component
-
username
Returns the value of theusernamerecord component.- Returns:
- the value of the
usernamerecord component
-
role
Returns the value of therolerecord component.- Returns:
- the value of the
rolerecord component
-
messageType
Returns the value of themessageTyperecord component.- Returns:
- the value of the
messageTyperecord component
-
permissionRequest
Returns the value of thepermissionRequestrecord component.- Returns:
- the value of the
permissionRequestrecord component
-
resourceName
Returns the value of theresourceNamerecord component.- Returns:
- the value of the
resourceNamerecord component
-
valueLength
public int valueLength()Returns the value of thevalueLengthrecord component.- Returns:
- the value of the
valueLengthrecord component
-