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

io.vertx.httpproxy.ProxyInterceptor Maven / Gradle / Ivy

There is a newer version: 5.0.0.CR3
Show newest version
package io.vertx.httpproxy;

import io.vertx.codegen.annotations.VertxGen;
import io.vertx.core.Future;

/**
 * A {@link HttpProxy} interceptor.
 */
@VertxGen
public interface ProxyInterceptor {

  /**
   * Handle the proxy request at the stage of this interceptor.
   *
   * @param context the proxy context
   * @return when the request has actually been sent to the origin
   */
  default Future handleProxyRequest(ProxyContext context) {
    return context.sendRequest();
  }

  /**
   * Handle the proxy response at the stage of this interceptor.
   *
   * @param context the proxy context
   * @return when the response has actually been sent to the user-agent
   */
  default Future handleProxyResponse(ProxyContext context) {
    return context.sendResponse();
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy