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 int 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();
74
75 void resetBuffer();
76
77 void returnBuffers();
78
79 void sendError(int code, String reason, String content, boolean close) throws IOException;
80
81 void setHead(boolean head);
82
83 void setRequest(String method, String uri);
84
85 void setResponse(int status, String reason);
86
87
88 void setSendServerVersion(boolean sendServerVersion);
89
90 void setVersion(int version);
91
92 boolean isIdle();
93
94 void setContentLength(long length);
95
96 void setPersistent(boolean persistent);
97
98 void setDate(Buffer timeStampBuffer);
99
100
101 }