org.ocpsoft.rewrite.servlet.config.proxy.ProxyServletConfig Maven / Gradle / Ivy
/*
* 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());
}
}