1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package org.eclipse.jetty.http;
21
22 import java.io.IOException;
23
24 import org.eclipse.jetty.io.Buffer;
25
26 public interface Generator
27 {
28 public static final boolean LAST=true;
29 public static final boolean MORE=false;
30
31
32
33
34
35
36
37
38
39
40
41
42 void addContent(Buffer content, boolean last) throws IOException;
43
44 void complete() throws IOException;
45
46 void completeHeader(HttpFields responseFields, boolean last) throws IOException;
47
48 int flushBuffer() throws IOException;
49
50 int getContentBufferSize();
51
52 long getContentWritten();
53
54 boolean isWritten();
55
56 boolean isAllContentWritten();
57
58 void increaseContentBufferSize(int size);
59
60 boolean isBufferFull();
61
62 boolean isCommitted();
63
64 boolean isComplete();
65
66 boolean isPersistent();
67
68 void reset();
69
70 void resetBuffer();
71
72 void returnBuffers();
73
74 void sendError(int code, String reason, String content, boolean close) throws IOException;
75
76 void setHead(boolean head);
77
78 void setRequest(String method, String uri);
79
80 void setResponse(int status, String reason);
81
82
83 void setSendServerVersion(boolean sendServerVersion);
84
85 void setVersion(int version);
86
87 boolean isIdle();
88
89 void setContentLength(long length);
90
91 void setPersistent(boolean persistent);
92
93 void setDate(Buffer timeStampBuffer);
94
95
96 }