All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.triceo.splitlog.conditions.AllFollowerMessagesAcceptingCondition Maven / Gradle / Ivy

Go to download

These are the core parts of splitlog. This is where the implementations of the public APIs live. Classes from this package come with no API stability guarantees.

There is a newer version: 1.7.2
Show newest version
package com.github.triceo.splitlog.conditions;

import com.github.triceo.splitlog.api.Follower;
import com.github.triceo.splitlog.api.Message;
import com.github.triceo.splitlog.api.MessageDeliveryStatus;
import com.github.triceo.splitlog.api.MidDeliveryMessageCondition;
import com.github.triceo.splitlog.api.SimpleMessageCondition;

/**
 * This will accept any message.
 */
public final class AllFollowerMessagesAcceptingCondition implements MidDeliveryMessageCondition,
        SimpleMessageCondition {

    public static final AllFollowerMessagesAcceptingCondition INSTANCE = new AllFollowerMessagesAcceptingCondition();

    private AllFollowerMessagesAcceptingCondition() {
        // singleton
    }

    @Override
    public boolean accept(final Message evaluate) {
        return true;
    }

    @Override
    public boolean accept(final Message evaluate, final MessageDeliveryStatus status, final Follower source) {
        return this.accept(evaluate);
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy