Interface TransportAuditListener

All Superinterfaces:
EventListener

public interface TransportAuditListener extends 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 Type
    Method
    Description
    boolean
    Audits a transport operation described by the provided TransportAuditEvent and decides whether the operation is permitted.