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

io.vertx.ext.web.Http2PushMapping Maven / Gradle / Ivy

There is a newer version: 5.0.0.CR1
Show newest version
package io.vertx.ext.web;

import io.vertx.codegen.annotations.DataObject;
import io.vertx.codegen.json.annotations.JsonGen;
import io.vertx.core.json.JsonObject;

@DataObject
@JsonGen(publicConverter = false)
public class Http2PushMapping {
  private String filePath;
  private String extensionTarget;
  private boolean noPush;

  /**
   * Copy constructor
   *
   * @param other the http2PushMapping to copy
   */
  public Http2PushMapping(Http2PushMapping other) {
    this.filePath = other.filePath;
    this.extensionTarget = other.extensionTarget;
    this.noPush = other.noPush;
  }

  /**
   * Default constructor
   */
  public Http2PushMapping() {
  }

  /**
   * Constructor from JSON
   *
   * @param json the JSON
   */
  public Http2PushMapping(JsonObject json) {
    Http2PushMappingConverter.fromJson(json, this);
  }

  /**
   * Constructor with params for Link preload
   *
   * @param filePath the path of file to preload
   * @param extensionTarget the link header extension
   * @param noPush describes if the file should be pushed
   */
  public Http2PushMapping(String filePath, String extensionTarget, boolean noPush) {
    this.filePath = filePath;
    this.extensionTarget = extensionTarget;
    this.noPush = noPush;
  }

  public String getFilePath() {
    return filePath;
  }

  public void setFilePath(String filePath) {
    this.filePath = filePath;
  }

  public String getExtensionTarget() {
    return extensionTarget;
  }

  public void setExtensionTarget(String extensionTarget) {
    this.extensionTarget = extensionTarget;
  }

  public boolean isNoPush() {
    return noPush;
  }

  public void setNoPush(boolean noPush) {
    this.noPush = noPush;
  }

  public JsonObject toJson() {
    JsonObject json = new JsonObject();
    Http2PushMappingConverter.toJson(this, json);
    return json;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy