1 /*
2 * Copyright 2012 The Netty Project
3 *
4 * The Netty Project licenses this file to you under the Apache License,
5 * version 2.0 (the "License"); you may not use this file except in compliance
6 * with the License. You may obtain a copy of the License at:
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 * License for the specific language governing permissions and limitations
14 * under the License.
15 */
16 package org.jboss.netty.handler.codec.http;
17
18 import java.util.List;
19 import java.util.Map;
20 import java.util.Set;
21
22 /**
23 * The last {@link HttpChunk} which has trailing headers.
24 */
25 public interface HttpChunkTrailer extends HttpChunk {
26
27 /**
28 * Always returns {@code true}.
29 */
30 boolean isLast();
31
32 /**
33 * @deprecated Use {@link HttpChunkTrailer#trailingHeaders()} instead.
34 */
35 @Deprecated
36 String getHeader(String name);
37
38 /**
39 * @deprecated Use {@link HttpChunkTrailer#trailingHeaders()} instead.
40 */
41 @Deprecated
42 List<String> getHeaders(String name);
43
44 /**
45 * @deprecated Use {@link HttpChunkTrailer#trailingHeaders()} instead.
46 */
47 @Deprecated
48 List<Map.Entry<String, String>> getHeaders();
49
50 /**
51 * @deprecated Use {@link HttpChunkTrailer#trailingHeaders()} instead.
52 */
53 @Deprecated
54 boolean containsHeader(String name);
55
56 /**
57 * @deprecated Use {@link HttpChunkTrailer#trailingHeaders()} instead.
58 */
59 @Deprecated
60 Set<String> getHeaderNames();
61
62 /**
63 * @deprecated Use {@link HttpChunkTrailer#trailingHeaders()} instead.
64 */
65 @Deprecated
66 void addHeader(String name, Object value);
67
68 /**
69 * @deprecated Use {@link HttpChunkTrailer#trailingHeaders()} instead.
70 */
71 @Deprecated
72 void setHeader(String name, Object value);
73
74 /**
75 * @deprecated Use {@link HttpChunkTrailer#trailingHeaders()} instead.
76 */
77 @Deprecated
78 void setHeader(String name, Iterable<?> values);
79
80 /**
81 * @deprecated Use {@link HttpChunkTrailer#trailingHeaders()} instead.
82 */
83 @Deprecated
84 void removeHeader(String name);
85
86 /**
87 * @deprecated Use {@link HttpChunkTrailer#trailingHeaders()} instead.
88 */
89 @Deprecated
90 void clearHeaders();
91
92 /**
93 * Returns the trialing headers of this trailer.
94 */
95 HttpHeaders trailingHeaders();
96 }