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

io.vertx.ext.web.proxy.handler.impl.ProxyHandlerImpl Maven / Gradle / Ivy

There is a newer version: 5.0.0.CR3
Show newest version
package io.vertx.ext.web.proxy.handler.impl;

import io.vertx.ext.web.RoutingContext;
import io.vertx.ext.web.proxy.handler.ProxyHandler;
import io.vertx.httpproxy.HttpProxy;

/**
 * @author Emad Alblueshi
 */

public class ProxyHandlerImpl implements ProxyHandler {

  private final HttpProxy httpProxy;

  public ProxyHandlerImpl(HttpProxy httpProxy) {
    this.httpProxy = httpProxy;
  }

  public ProxyHandlerImpl(HttpProxy httpProxy, int port, String host) {
    this.httpProxy = httpProxy.origin(port, host);
  }

  @Override
  public void handle(RoutingContext ctx) {
    httpProxy.handle(ctx.request());
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy