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

biz.paluch.logging.gelf.intern.GelfSenderProvider Maven / Gradle / Ivy

There is a newer version: 1.15.1
Show newest version
package biz.paluch.logging.gelf.intern;

import java.io.IOException;

/**
 * Strategy interface to create a {@link GelfSender}. Implementations decide based on the {@code host} string whether they
 * support {@link GelfSender} creation.
 * 
 * @author https://github.com/Batigoal/logstash-gelf.git
 * @author Mark Paluch
 */
public interface GelfSenderProvider {

    /**
     * @param host the host string
     * @return true if the host scheme/pattern/uri is supported by this provider.
     */
    boolean supports(String host);

    /**
     * Create the sender based on the passed configuration.
     *
     * @param configuration the sender configuration
     * @return GelfSender instance.
     * @throws IOException if there is an error in the underlying protocol
     */
    GelfSender create(GelfSenderConfiguration configuration) throws IOException;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy