package com.sf.vertx.handle;

import io.vertx.circuitbreaker.CircuitBreaker;
import io.vertx.codegen.annotations.VertxGen;
import io.vertx.core.Handler;
import io.vertx.ext.web.RoutingContext;
import io.vertx.ext.web.client.WebClient;
import io.vertx.httpproxy.HttpProxy;

/**
 * @author <a href="mailto:emad.albloushi@gmail.com">Emad Alblueshi</a>
 */

@VertxGen
public interface ProxyHandler extends Handler<RoutingContext> {

	static ProxyHandler create(WebClient mainWebClient,  HttpProxy httpProxy) {
		return new ProxyHandlerImpl(mainWebClient, httpProxy);
	}

	static ProxyHandler create(HttpProxy httpProxy) {
		return new ProxyHandlerImpl(httpProxy);
	}

	static ProxyHandler create(HttpProxy httpProxy, int port, String host) {
		return new ProxyHandlerImpl(httpProxy, port, host);
	}
}
