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

com.purej.vminspect.http.HttpRequest Maven / Gradle / Ivy

// Copyright (c), 2013, adopus consulting GmbH Switzerland, all rights reserved.
package com.purej.vminspect.http;

import java.util.HashMap;
import java.util.Map;

/**
 * Encapsulates a HTTP request. This only stores the parts of a GET request that are
 * used by VM inspection. This class allows decoupling execution logic from the concrete
 * request-implementation (eg. for example servlet-spec version, custom HTTP server etc.)
 *
 * @author Stefan Mueller
 */
public class HttpRequest {
  private final Map _parameters = new HashMap();
  private final Map _cookies = new HashMap();

  /**
   * Returns the named parameter value.
   */
  public String getParameter(String name) {
    return _parameters.get(name);
  }

  /**
   * Returns the map of parameter keys and values.
   */
  public Map getParameters() {
    return _parameters;
  }

  /**
   * Returns the named cookie value.
   */
  public String getCookie(String name) {
    return _cookies.get(name);
  }

  /**
   * Returns the map of cookies names and values.
   */
  public Map getCookies() {
    return _cookies;
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy