Interface Route

All Superinterfaces:
Predicate<LogEntry>

public interface Route extends Predicate<LogEntry>
Represents a rule for routing audit logEntries to a specific backend.

A Route is a Predicate that determines whether a given LogEntry should be routed to a particular backend, identified by its name. Implementations can define custom logic in the Predicate.test(Object) method to filter events.

Since:
2025.16
  • Method Summary

    Modifier and Type
    Method
    Description
    static Route
    allEventsTo(String backendName)
    Creates a Route that matches all events, and routes them to the given backend.
    Returns the name of the backend to which matching LogEntry events should be routed.
     
    static Route
    of(String name, String backendName, Predicate<LogEntry> predicate)
    Creates a Route that matches events based on the provided predicate, and routes them to the given backend.

    Methods inherited from interface java.util.function.Predicate

    and, negate, or, test
  • Method Details

    • getName

      String getName()
      Returns:
      the route name
    • getBackendName

      String getBackendName()
      Returns the name of the backend to which matching LogEntry events should be routed.
      Returns:
      the backend name
    • allEventsTo

      static Route allEventsTo(String backendName)
      Creates a Route that matches all events, and routes them to the given backend.
      Parameters:
      backendName - the name of the backend
      Returns:
      a Route that matches all events
    • of

      static Route of(String name, String backendName, Predicate<LogEntry> predicate)
      Creates a Route that matches events based on the provided predicate, and routes them to the given backend.
      Parameters:
      backendName - the name of the backend
      predicate - the predicate to apply to LogEntry events for matching
      Returns:
      a Route that matches events based on the provided predicate