View Javadoc
1   /*
2    * Copyright 2013 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 io.netty.handler.codec.spdy;
17  
18  import io.netty.handler.codec.AsciiString;
19  import io.netty.handler.codec.TextHeaders;
20  
21  /**
22   * Provides the constants for the standard SPDY HTTP header names and commonly
23   * used utility methods that access a {@link SpdyHeadersFrame}.
24   */
25  public interface SpdyHeaders extends TextHeaders {
26  
27      /**
28       * SPDY HTTP header names
29       */
30      final class HttpNames {
31          /**
32           * {@code ":host"}
33           */
34          public static final AsciiString HOST = new AsciiString(":host");
35          /**
36           * {@code ":method"}
37           */
38          public static final AsciiString METHOD = new AsciiString(":method");
39          /**
40           * {@code ":path"}
41           */
42          public static final AsciiString PATH = new AsciiString(":path");
43          /**
44           * {@code ":scheme"}
45           */
46          public static final AsciiString SCHEME = new AsciiString(":scheme");
47          /**
48           * {@code ":status"}
49           */
50          public static final AsciiString STATUS = new AsciiString(":status");
51          /**
52           * {@code ":version"}
53           */
54          public static final AsciiString VERSION = new AsciiString(":version");
55  
56          private HttpNames() { }
57      }
58  
59      @Override
60      SpdyHeaders add(CharSequence name, CharSequence value);
61  
62      @Override
63      SpdyHeaders add(CharSequence name, Iterable<? extends CharSequence> values);
64  
65      @Override
66      SpdyHeaders add(CharSequence name, CharSequence... values);
67  
68      @Override
69      SpdyHeaders addObject(CharSequence name, Object value);
70  
71      @Override
72      SpdyHeaders addObject(CharSequence name, Iterable<?> values);
73  
74      @Override
75      SpdyHeaders addObject(CharSequence name, Object... values);
76  
77      @Override
78      SpdyHeaders addBoolean(CharSequence name, boolean value);
79  
80      @Override
81      SpdyHeaders addByte(CharSequence name, byte value);
82  
83      @Override
84      SpdyHeaders addChar(CharSequence name, char value);
85  
86      @Override
87      SpdyHeaders addShort(CharSequence name, short value);
88  
89      @Override
90      SpdyHeaders addInt(CharSequence name, int value);
91  
92      @Override
93      SpdyHeaders addLong(CharSequence name, long value);
94  
95      @Override
96      SpdyHeaders addFloat(CharSequence name, float value);
97  
98      @Override
99      SpdyHeaders addDouble(CharSequence name, double value);
100 
101     @Override
102     SpdyHeaders addTimeMillis(CharSequence name, long value);
103 
104     @Override
105     SpdyHeaders add(TextHeaders headers);
106 
107     @Override
108     SpdyHeaders set(CharSequence name, CharSequence value);
109 
110     @Override
111     SpdyHeaders set(CharSequence name, Iterable<? extends CharSequence> values);
112 
113     @Override
114     SpdyHeaders set(CharSequence name, CharSequence... values);
115 
116     @Override
117     SpdyHeaders setBoolean(CharSequence name, boolean value);
118 
119     @Override
120     SpdyHeaders setByte(CharSequence name, byte value);
121 
122     @Override
123     SpdyHeaders setChar(CharSequence name, char value);
124 
125     @Override
126     SpdyHeaders setShort(CharSequence name, short value);
127 
128     @Override
129     SpdyHeaders setInt(CharSequence name, int value);
130 
131     @Override
132     SpdyHeaders setLong(CharSequence name, long value);
133 
134     @Override
135     SpdyHeaders setFloat(CharSequence name, float value);
136 
137     @Override
138     SpdyHeaders setDouble(CharSequence name, double value);
139 
140     @Override
141     SpdyHeaders setTimeMillis(CharSequence name, long value);
142 
143     @Override
144     SpdyHeaders setObject(CharSequence name, Object value);
145 
146     @Override
147     SpdyHeaders setObject(CharSequence name, Iterable<?> values);
148 
149     @Override
150     SpdyHeaders setObject(CharSequence name, Object... values);
151 
152     @Override
153     SpdyHeaders set(TextHeaders headers);
154 
155     @Override
156     SpdyHeaders setAll(TextHeaders headers);
157 
158     @Override
159     SpdyHeaders clear();
160 }