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

org.ocpsoft.rewrite.servlet.config.proxy.ProxyServletConfig Maven / Gradle / Ivy

There is a newer version: 10.0.2.Final
Show newest version
/*
 * Copyright 2013 Red Hat, Inc. and/or its affiliates.
 *
 * Licensed under the Eclipse Public License version 1.0, available at
 * http://www.eclipse.org/legal/epl-v10.html
 */
package org.ocpsoft.rewrite.servlet.config.proxy;

import java.util.Collections;
import java.util.Enumeration;
import java.util.Map;

import javax.servlet.ServletConfig;
import javax.servlet.ServletContext;

/**
 * @author Lincoln Baxter, III
 * 
 */
class ProxyServletConfig implements ServletConfig
{
   private final ServletContext context;
   private final Map params;

   public ProxyServletConfig(ServletContext context, Map params)
   {
      this.context = context;
      this.params = params;
   }

   @Override
   public String getServletName()
   {
      return "Rewrite ProxyServlet";
   }

   @Override
   public ServletContext getServletContext()
   {
      return context;
   }

   @Override
   public String getInitParameter(String name)
   {
      return params.get(name);
   }

   @Override
   public Enumeration getInitParameterNames()
   {
      return Collections.enumeration(params.keySet());
   }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy