org.jboss.resteasy.plugins.server.servlet.HttpServletResponseHeaders Maven / Gradle / Ivy
package org.jboss.resteasy.plugins.server.servlet;
import org.jboss.resteasy.resteasy_jaxrs.i18n.Messages;
import org.jboss.resteasy.spi.ResteasyProviderFactory;
import org.jboss.resteasy.util.CaseInsensitiveMap;
import javax.servlet.http.HttpServletResponse;
import javax.ws.rs.core.MultivaluedMap;
import javax.ws.rs.ext.RuntimeDelegate;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Set;
/**
* @author Bill Burke
* @version $Revision: 1 $
*/
@SuppressWarnings(value = "unchecked")
public class HttpServletResponseHeaders implements MultivaluedMap
{
private CaseInsensitiveMap cachedHeaders = new CaseInsensitiveMap();
private HttpServletResponse response;
private ResteasyProviderFactory factory;
public HttpServletResponseHeaders(final HttpServletResponse response, final ResteasyProviderFactory factory)
{
this.response = response;
this.factory = factory;
}
@Override
public void addAll(String key, Object... newValues)
{
for (Object value : newValues)
{
add(key, value);
}
}
@Override
public void addAll(String key, List