Interface AuditManager.CloseableAuditContext
- All Superinterfaces:
AutoCloseable
- Enclosing interface:
AuditManager
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface
public static interface AuditManager.CloseableAuditContext
extends AutoCloseable
An
AutoCloseable handle returned by AuditManager.pushAuditContext(AuditContext) that
restores the previously-active AuditContext when closed, intended for use with
try-with-resources.
Note: AuditContext is final, so this is purely a scope guard for restoring
the threadlocal rather than a forwarding wrapper around an AuditContext.
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Restores theAuditContextthat was active before this one was pushed.
-
Method Details
-
close
void close()Restores theAuditContextthat was active before this one was pushed.- Specified by:
closein interfaceAutoCloseable
-