1 package com.github.triceo.splitlog.conditions;
2
3 import com.github.triceo.splitlog.api.Follower;
4 import com.github.triceo.splitlog.api.LogWatch;
5 import com.github.triceo.splitlog.api.Message;
6 import com.github.triceo.splitlog.api.MessageDeliveryStatus;
7 import com.github.triceo.splitlog.api.MidDeliveryMessageCondition;
8 import com.github.triceo.splitlog.api.SimpleMessageCondition;
9
10
11
12
13 public final class AllMessagesAcceptingCondition implements MidDeliveryMessageCondition, SimpleMessageCondition {
14
15 public static final AllMessagesAcceptingCondition INSTANCE = new AllMessagesAcceptingCondition();
16
17 private AllMessagesAcceptingCondition() {
18
19 }
20
21 @Override
22 public boolean accept(final Message evaluate) {
23 return true;
24 }
25
26 @Override
27 public boolean accept(final Message evaluate, final MessageDeliveryStatus status, final Follower source) {
28 return this.accept(evaluate);
29 }
30
31 @Override
32 public boolean accept(final Message evaluate, final MessageDeliveryStatus status, final LogWatch source) {
33 return this.accept(evaluate);
34 }
35
36 }