Class SnifferBuilder


  • public final class SnifferBuilder
    extends java.lang.Object
    Sniffer builder. Helps creating a new Sniffer.
    • Field Detail

      • DEFAULT_SNIFF_INTERVAL

        public static final long DEFAULT_SNIFF_INTERVAL
      • DEFAULT_SNIFF_AFTER_FAILURE_DELAY

        public static final long DEFAULT_SNIFF_AFTER_FAILURE_DELAY
    • Method Detail

      • setSniffIntervalMillis

        public SnifferBuilder setSniffIntervalMillis​(int sniffIntervalMillis)
        Sets the interval between consecutive ordinary sniff executions in milliseconds. Will be honoured when sniffOnFailure is disabled or when there are no failures between consecutive sniff executions.
        Throws:
        java.lang.IllegalArgumentException - if sniffIntervalMillis is not greater than 0
      • setSniffAfterFailureDelayMillis

        public SnifferBuilder setSniffAfterFailureDelayMillis​(int sniffAfterFailureDelayMillis)
        Sets the delay of a sniff execution scheduled after a failure (in milliseconds)
      • build

        public Sniffer build()
        Creates the Sniffer based on the provided configuration.