public class S3AuditContext extends Object implements AuditContext
Constructor and Description |
---|
S3AuditContext(AsyncUserAccessAuditLogWriter asyncAuditLogWriter)
Constructor of
S3AuditContext . |
Modifier and Type | Method and Description |
---|---|
void |
close() |
S3AuditContext |
setAllowed(boolean allowed)
Set to true if the operation associated with this
AuditContext is allowed, false
otherwise. |
S3AuditContext |
setBucket(String bucket)
Sets mBucket field.
|
S3AuditContext |
setCommand(String command)
Sets mCommand field.
|
S3AuditContext |
setCreationTimeNs(long creationTimeNs)
Sets mCreationTimeNs field.
|
S3AuditContext |
setIp(String ip)
Sets mIp field.
|
S3AuditContext |
setObject(String object)
Sets mObject field.
|
S3AuditContext |
setSucceeded(boolean succeeded)
Set to true if the operration associated with this
AuditContext is allowed and
succeeds. |
S3AuditContext |
setUgi(String ugi)
Sets mUgi field.
|
String |
toString() |
public S3AuditContext(AsyncUserAccessAuditLogWriter asyncAuditLogWriter)
S3AuditContext
.asyncAuditLogWriter
- public S3AuditContext setUgi(String ugi)
ugi
- the client user name of the client user of this requestAuditContext
instancepublic S3AuditContext setCommand(String command)
command
- the command associated with S3 rest serviceAuditContext
instancepublic S3AuditContext setIp(String ip)
ip
- the IP of the clientAuditContext
instancepublic S3AuditContext setCreationTimeNs(long creationTimeNs)
creationTimeNs
- the System.nanoTime() when this operation create,
it only can be used to compute operation mExecutionTimeAuditContext
instancepublic S3AuditContext setBucket(String bucket)
bucket
- the bucket nameAuditContext
instancepublic S3AuditContext setObject(String object)
object
- the object nameAuditContext
instancepublic S3AuditContext setAllowed(boolean allowed)
AuditContext
AuditContext
is allowed, false
otherwise.setAllowed
in interface AuditContext
allowed
- true if operation is allowed, false otherwiseAuditContext
instance itselfpublic S3AuditContext setSucceeded(boolean succeeded)
AuditContext
AuditContext
is allowed and
succeeds.setSucceeded
in interface AuditContext
succeeded
- true if the operation has succeeded, false otherwiseAuditContext
instance itselfpublic void close()
close
in interface AuditContext
close
in interface Closeable
close
in interface AutoCloseable
Copyright © 2023. All Rights Reserved.