View Javadoc
1   package com.github.triceo.splitlog.api;
2   
3   /**
4    * Allows users to filter messages based on their own criteria. These conditions
5    * will be used whenever the {@link LogWatch} and its {@link Follower}s need to
6    * notify other parts of code about newly received {@link Message}s.
7    *
8    * @param <S>
9    *            Where this is getting its {@link Message}s from.
10   */
11  public interface MidDeliveryMessageCondition<S extends MessageProducer<S>> {
12  
13      /**
14       * Evaluate a message against a user-provided condition.
15       *
16       * @param evaluate
17       *            The message to evaluate.
18       * @param status
19       *            Current processing status of the message.
20       * @param source
21       *            The notifying object.
22       * @return True if message matches.
23       */
24      boolean accept(Message evaluate, MessageDeliveryStatus status, S source);
25  
26  }