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

com.github.slem1.await.HttpConnectionConfig Maven / Gradle / Ivy

There is a newer version: 1.2.2
Show newest version
package com.github.slem1.await;

import java.net.URL;

/**
 * Plugin configuration POJO for http service.
 *
 * @author slemoine
 */
public class HttpConnectionConfig implements MojoConnectionConfig {

    private URL url;

    private int statusCode;

    private int priority;

    /**
     * Default constructor used by maven.
     */
    public HttpConnectionConfig() {

    }

    /**
     * Convenient constructor to create instance.
     *
     * @param url        url of the service.
     * @param statusCode expected response status code.
     * @param priority   the connection priority.
     */
    public HttpConnectionConfig(URL url, int statusCode, int priority) {
        this.url = url;
        this.statusCode = statusCode;
        this.priority = priority;
    }

    public int getPriority() {
        return priority;
    }

    @Override
    public Service buildService() {
        return new HttpService(url, statusCode);
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy