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

org.rajivprab.sava.logging.BufferedDispatcher Maven / Gradle / Ivy

package org.rajivprab.sava.logging;

import com.google.common.collect.HashBasedTable;
import com.google.common.collect.Table;

import java.util.Map;

// Very simple implementation, suitable for testing purposes. Not thread-safe. Does not make defensive copies.
public class BufferedDispatcher implements Dispatcher {
    private final Table dispatches = HashBasedTable.create();

    @Override
    public void dispatch(Severity severity, String title, String message) {
        dispatches.put(severity, title, message);
    }

    public Map getDispatches(Severity severity) {
        return dispatches.row(severity);
    }

    public Table getDispatches() {
        return dispatches;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy