org.jboss.resteasy.spi.HttpResponse Maven / Gradle / Ivy
package org.jboss.resteasy.spi;
import javax.ws.rs.core.MultivaluedMap;
import javax.ws.rs.core.NewCookie;
import java.io.IOException;
import java.io.OutputStream;
/**
* Bridge interface between the base Resteasy JAX-RS implementation and the actual HTTP transport (i.e. a servlet container)
*
* @author Bill Burke
* @version $Revision: 1 $
*/
public interface HttpResponse
{
int getStatus();
void setStatus(int status);
MultivaluedMap getOutputHeaders();
OutputStream getOutputStream() throws IOException;
void setOutputStream(OutputStream os);
void addNewCookie(NewCookie cookie);
void sendError(int status) throws IOException;
void sendError(int status, String message) throws IOException;
boolean isCommitted();
/**
* reset status and headers. Will fail if response is committed
*/
void reset();
void flushBuffer() throws IOException;
}