1 /*
2 * Copyright 2015 The Netty Project
3 *
4 * The Netty Project licenses this file to you under the Apache License, version 2.0 (the
5 * "License"); you may not use this file except in compliance with the License. You may obtain a
6 * copy of the License at:
7 *
8 * https://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software distributed under the License
11 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
12 * or implied. See the License for the specific language governing permissions and limitations under
13 * the License.
14 */
15 package io.netty.handler.codec.http2;
16
17 /**
18 * Builds an {@link InboundHttp2ToHttpAdapter}.
19 */
20 public final class InboundHttp2ToHttpAdapterBuilder
21 extends AbstractInboundHttp2ToHttpAdapterBuilder<InboundHttp2ToHttpAdapter, InboundHttp2ToHttpAdapterBuilder> {
22
23 /**
24 * Creates a new {@link InboundHttp2ToHttpAdapter} builder for the specified {@link Http2Connection}.
25 *
26 * @param connection the object which will provide connection notification events
27 * for the current connection
28 */
29 public InboundHttp2ToHttpAdapterBuilder(Http2Connection connection) {
30 super(connection);
31 }
32
33 @Override
34 public InboundHttp2ToHttpAdapterBuilder maxContentLength(int maxContentLength) {
35 return super.maxContentLength(maxContentLength);
36 }
37
38 @Override
39 public InboundHttp2ToHttpAdapterBuilder validateHttpHeaders(boolean validate) {
40 return super.validateHttpHeaders(validate);
41 }
42
43 @Override
44 public InboundHttp2ToHttpAdapterBuilder propagateSettings(boolean propagate) {
45 return super.propagateSettings(propagate);
46 }
47
48 @Override
49 public InboundHttp2ToHttpAdapter build() {
50 return super.build();
51 }
52
53 @Override
54 protected InboundHttp2ToHttpAdapter build(Http2Connection connection,
55 int maxContentLength,
56 boolean validateHttpHeaders,
57 boolean propagateSettings) throws Exception {
58
59 return new InboundHttp2ToHttpAdapter(connection, maxContentLength,
60 validateHttpHeaders, propagateSettings);
61 }
62 }