summaryrefslogtreecommitdiffstats
path: root/src/com/vaadin/terminal/WrappedResponse.java
blob: bbcc1ff0031bb1a1e661cb19c1a953055337787f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*
@VaadinApache2LicenseForJavaFiles@
 */

package com.vaadin.terminal;

import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.Serializable;

public interface WrappedResponse extends Serializable {

    public void setStatus(int statusCode);

    public void setContentType(String contentType);

    public void setHeader(String name, String value);

    public void setDateHeader(String name, long timestamp);

    public OutputStream getOutputStream() throws IOException;

    public PrintWriter getWriter() throws IOException;

    /**
     * Sets time in milliseconds, -1 means no cache at all. All required headers
     * related to caching in the response are set based on the time.
     * 
     * @param milliseconds
     *            Cache time in milliseconds
     */
    public void setCacheTime(long milliseconds);

    public void sendError(int errorCode, String message) throws IOException;

    public DeploymentConfiguration getDeploymentConfiguration();
}