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

io.vertx.httpproxy.ProxyContext 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 controller for proxy interception.
 */
@VertxGen
public interface ProxyContext {

  /**
   * @return the proxy request
   */
  ProxyRequest request();

  /**
   * @return the proxy response, it might be {@code null} if the response has not been sent
   */
  ProxyResponse response();

  /**
   *
   */
  Future sendRequest();

  /**
   *
   */
  Future sendResponse();

  /**
   * @return if this request or response is the handshake of WebSocket
   */
  boolean isWebSocket();

  /**
   * Attach a payload to the context
   *
   * @param name the payload name
   * @param value any payload value
   */
  void set(String name, Object value);

  /**
   * Get a payload attached to this context
   *
   * @param name the payload name
   * @param type the expected payload type
   * @return the attached payload
   */
   T get(String name, Class type);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy