Interface TransportAuditListener
- All Superinterfaces:
EventListener
The
TransportAuditListener interface is implemented by objects that want to control and
audit the communication of a TransportMapping. Implementations are registered
with a transport mapping through AbstractTransportMapping.addTransportAuditListener(TransportAuditListener) and
are notified before a transport binds a listen address, before outgoing data is sent, when
incoming data is received, and when a listen address or connection is closed.
The single transportAudit(TransportAuditEvent) method acts both as an authorization hook
and as an audit hook: returning false denies the corresponding communication (binding,
sending, or receiving), while returning true allows it. Implementations may additionally
write the audited TransportAuditEvent to a dedicated audit log. For
TransportAuditEvent.TransportOperation.CLOSE events the return value is ignored, because a
close cannot be denied.
- Since:
- 3.12.0
- Version:
- 3.12.0
- Author:
- Frank Fock
-
Method Summary
Modifier and TypeMethodDescriptionbooleanAudits a transport operation described by the providedTransportAuditEventand decides whether the operation is permitted.
-
Method Details
-
transportAudit
Audits a transport operation described by the providedTransportAuditEventand decides whether the operation is permitted.- Parameters:
event- theTransportAuditEventdescribing the transport operation to be audited.- Returns:
trueif the operation is permitted,falseto deny (cancel) it. The return value is ignored forTransportAuditEvent.TransportOperation.CLOSEevents.
-