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