io.vertx.rxjava.ext.web.ParsedHeaderValue Maven / Gradle / Ivy
/*
 * Copyright 2014 Red Hat, Inc.
 *
 * Red Hat licenses this file to you under the Apache License, version 2.0
 * (the "License"); you may not use this file except in compliance with the
 * License.  You may obtain a copy of the License at:
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
 * License for the specific language governing permissions and limitations
 * under the License.
 */
package io.vertx.rxjava.ext.web;
import rx.Observable;
import rx.Single;
import io.vertx.rx.java.RxHelper;
import io.vertx.rx.java.WriteStreamSubscriber;
import io.vertx.rx.java.SingleOnSubscribeAdapter;
import java.util.Map;
import java.util.Set;
import java.util.List;
import java.util.Iterator;
import java.util.function.Function;
import java.util.stream.Collectors;
import io.vertx.core.Handler;
import io.vertx.core.AsyncResult;
import io.vertx.core.json.JsonObject;
import io.vertx.core.json.JsonArray;
import io.vertx.lang.rx.RxGen;
import io.vertx.lang.rx.TypeArg;
import io.vertx.lang.rx.MappingIterator;
@RxGen(io.vertx.ext.web.ParsedHeaderValue.class)
public interface ParsedHeaderValue {
  io.vertx.ext.web.ParsedHeaderValue getDelegate();
  /**
   * Contains the raw value that was received from the user agent
   * @return 
   */
  public java.lang.String rawValue();
  /**
   * Holds the unparsed value of the header.
   * For the most part, this is the content before the semi-colon (";")
   * @return 
   */
  public java.lang.String value();
  /**
   * Holds the weight specified in the "q" parameter of the header.
   * If the parameter is not specified, 1.0 is assumed according to
   * rfc7231
   * @return 
   */
  public float weight();
  /**
   * The value of the parameter specified by this key. Each is one of 3 things:
   * 
   * - null <- That key was not specified
 
   * - ParsedHeaderValue.EMPTY (tested using ==) <- The value was not specified
 
   * - [Other] <- The value of the parameter
 
   * 
   * Note: The q parameter is never present.
   * @param key 
   * @return 
   */
  public java.lang.String parameter(java.lang.String key);
  /**
   * The parameters specified in this header value.
   * Note: The q parameter is never present.
   * @return Unmodifiable Map of parameters of this header value
   */
  public java.util.Map parameters();
  /**
   * Is this an allowed operation as specified by the corresponding header?
   * @return 
   */
  public boolean isPermitted();
  /**
   * Test if this header is matched by matchTry header
   * @param matchTry The header to be matched from
   * @return true if this header represents a subset of matchTry, otherwise, false
   */
  public boolean isMatchedBy(io.vertx.rxjava.ext.web.ParsedHeaderValue matchTry);
  /**
   * An integer that represents the absolute order position of this header
   * @return 
   */
  public int weightedOrder();
  public static ParsedHeaderValue newInstance(io.vertx.ext.web.ParsedHeaderValue arg) {
    return arg != null ? new ParsedHeaderValueImpl(arg) : null;
  }
}
class ParsedHeaderValueImpl implements ParsedHeaderValue {
  private final io.vertx.ext.web.ParsedHeaderValue delegate;
  
  public ParsedHeaderValueImpl(io.vertx.ext.web.ParsedHeaderValue delegate) {
    this.delegate = delegate;
  }
  public ParsedHeaderValueImpl(Object delegate) {
    this.delegate = (io.vertx.ext.web.ParsedHeaderValue)delegate;
  }
  public io.vertx.ext.web.ParsedHeaderValue getDelegate() {
    return delegate;
  }
  /**
   * Contains the raw value that was received from the user agent
   * @return 
   */
  public java.lang.String rawValue() { 
    java.lang.String ret = delegate.rawValue();
    return ret;
  }
  /**
   * Holds the unparsed value of the header.
   * For the most part, this is the content before the semi-colon (";")
   * @return 
   */
  public java.lang.String value() { 
    java.lang.String ret = delegate.value();
    return ret;
  }
  /**
   * Holds the weight specified in the "q" parameter of the header.
   * If the parameter is not specified, 1.0 is assumed according to
   * rfc7231
   * @return 
   */
  public float weight() { 
    float ret = delegate.weight();
    return ret;
  }
  /**
   * The value of the parameter specified by this key. Each is one of 3 things:
   * 
   * - null <- That key was not specified
 
   * - ParsedHeaderValue.EMPTY (tested using ==) <- The value was not specified
 
   * - [Other] <- The value of the parameter
 
   * 
   * Note: The q parameter is never present.
   * @param key 
   * @return 
   */
  public java.lang.String parameter(java.lang.String key) { 
    java.lang.String ret = delegate.parameter(key);
    return ret;
  }
  /**
   * The parameters specified in this header value.
   * Note: The q parameter is never present.
   * @return Unmodifiable Map of parameters of this header value
   */
  public java.util.Map parameters() { 
    java.util.Map ret = delegate.parameters();
    return ret;
  }
  /**
   * Is this an allowed operation as specified by the corresponding header?
   * @return 
   */
  public boolean isPermitted() { 
    boolean ret = delegate.isPermitted();
    return ret;
  }
  /**
   * Test if this header is matched by matchTry header
   * @param matchTry The header to be matched from
   * @return true if this header represents a subset of matchTry, otherwise, false
   */
  public boolean isMatchedBy(io.vertx.rxjava.ext.web.ParsedHeaderValue matchTry) { 
    boolean ret = delegate.isMatchedBy(matchTry.getDelegate());
    return ret;
  }
  /**
   * An integer that represents the absolute order position of this header
   * @return 
   */
  public int weightedOrder() { 
    int ret = delegate.weightedOrder();
    return ret;
  }
  /**
   * If no "q" parameter is present, the default weight is 1.
   */
 float DEFAULT_WEIGHT = io.vertx.ext.web.ParsedHeaderValue.DEFAULT_WEIGHT;
}
       © 2015 - 2025 Weber Informatics LLC | Privacy Policy