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 isContentWritten();
60
61 void increaseContentBufferSize(int size);
62
63 boolean isBufferFull();
64
65 boolean isCommitted();
66
67 boolean isComplete();
68
69 boolean isPersistent();
70
71 void reset(boolean returnBuffers);
72
73 void resetBuffer();
74
75 void sendError(int code, String reason, String content, boolean close) throws IOException;
76
77 void setHead(boolean head);
78
79 void setRequest(String method, String uri);
80
81 void setResponse(int status, String reason);
82
83
84 void setSendServerVersion(boolean sendServerVersion);
85
86 void setVersion(int version);
87
88 boolean isIdle();
89
90 void setContentLength(long length);
91
92 void setPersistent(boolean persistent);
93
94 void setDate(Buffer timeStampBuffer);
95
96
97 }