View Javadoc
1   /*
2    * Copyright 2015 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    *   https://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  
17  package io.netty.handler.codec.http2;
18  
19  import io.netty.handler.codec.http2.Http2HeadersEncoder.SensitivityDetector;
20  
21  import static io.netty.util.internal.ObjectUtil.checkPositiveOrZero;
22  
23  /**
24   * Builder which builds {@link Http2ConnectionHandler} objects.
25   */
26  public final class Http2ConnectionHandlerBuilder
27          extends AbstractHttp2ConnectionHandlerBuilder<Http2ConnectionHandler, Http2ConnectionHandlerBuilder> {
28  
29      @Override
30      public Http2ConnectionHandlerBuilder validateHeaders(boolean validateHeaders) {
31          return super.validateHeaders(validateHeaders);
32      }
33  
34      @Override
35      public Http2ConnectionHandlerBuilder validateRequiredPseudoHeaders(boolean validateRequiredPseudoHeaders) {
36          return super.validateRequiredPseudoHeaders(validateRequiredPseudoHeaders);
37      }
38  
39      @Override
40      public Http2ConnectionHandlerBuilder initialSettings(Http2Settings settings) {
41          return super.initialSettings(settings);
42      }
43  
44      @Override
45      public Http2Settings initialSettings() {
46          return super.initialSettings();
47      }
48  
49      @Override
50      public Http2ConnectionHandlerBuilder frameListener(Http2FrameListener frameListener) {
51          return super.frameListener(frameListener);
52      }
53  
54      @Override
55      public Http2ConnectionHandlerBuilder gracefulShutdownTimeoutMillis(long gracefulShutdownTimeoutMillis) {
56          return super.gracefulShutdownTimeoutMillis(gracefulShutdownTimeoutMillis);
57      }
58  
59      @Override
60      public Http2ConnectionHandlerBuilder server(boolean isServer) {
61          return super.server(isServer);
62      }
63  
64      @Override
65      public Http2ConnectionHandlerBuilder connection(Http2Connection connection) {
66          return super.connection(connection);
67      }
68  
69      @Override
70      public Http2ConnectionHandlerBuilder maxReservedStreams(int maxReservedStreams) {
71          return super.maxReservedStreams(maxReservedStreams);
72      }
73  
74      @Override
75      public Http2ConnectionHandlerBuilder codec(Http2ConnectionDecoder decoder, Http2ConnectionEncoder encoder) {
76          return super.codec(decoder, encoder);
77      }
78  
79      @Override
80      public Http2ConnectionHandlerBuilder frameLogger(Http2FrameLogger frameLogger) {
81          return super.frameLogger(frameLogger);
82      }
83  
84      @Override
85      public Http2ConnectionHandlerBuilder encoderEnforceMaxConcurrentStreams(
86              boolean encoderEnforceMaxConcurrentStreams) {
87          return super.encoderEnforceMaxConcurrentStreams(encoderEnforceMaxConcurrentStreams);
88      }
89  
90      @Override
91      public Http2ConnectionHandlerBuilder encoderIgnoreMaxHeaderListSize(boolean encoderIgnoreMaxHeaderListSize) {
92          return super.encoderIgnoreMaxHeaderListSize(encoderIgnoreMaxHeaderListSize);
93      }
94  
95      @Override
96      public Http2ConnectionHandlerBuilder headerSensitivityDetector(SensitivityDetector headerSensitivityDetector) {
97          return super.headerSensitivityDetector(headerSensitivityDetector);
98      }
99  
100     @Override
101     @Deprecated
102     public Http2ConnectionHandlerBuilder initialHuffmanDecodeCapacity(int initialHuffmanDecodeCapacity) {
103         return super.initialHuffmanDecodeCapacity(initialHuffmanDecodeCapacity);
104     }
105 
106     @Override
107     public Http2ConnectionHandlerBuilder decoupleCloseAndGoAway(boolean decoupleCloseAndGoAway) {
108         return super.decoupleCloseAndGoAway(decoupleCloseAndGoAway);
109     }
110 
111     @Override
112     public Http2ConnectionHandlerBuilder flushPreface(boolean flushPreface) {
113         return super.flushPreface(flushPreface);
114     }
115 
116     @Override
117     public int decoderEnforceMaxConsecutiveEmptyDataFrames() {
118         return super.decoderEnforceMaxConsecutiveEmptyDataFrames();
119     }
120 
121     @Override
122     public Http2ConnectionHandlerBuilder decoderEnforceMaxConsecutiveEmptyDataFrames(int maxConsecutiveEmptyFrames) {
123         return super.decoderEnforceMaxConsecutiveEmptyDataFrames(maxConsecutiveEmptyFrames);
124     }
125 
126     @Override
127     public Http2ConnectionHandlerBuilder decoderEnforceMaxRstFramesPerWindow(
128             int maxRstFramesPerWindow, int secondsPerWindow) {
129         return super.decoderEnforceMaxRstFramesPerWindow(maxRstFramesPerWindow, secondsPerWindow);
130     }
131 
132     @Override
133     public Http2ConnectionHandlerBuilder encoderEnforceMaxRstFramesPerWindow(
134             int maxRstFramesPerWindow, int secondsPerWindow) {
135         return super.encoderEnforceMaxRstFramesPerWindow(maxRstFramesPerWindow, secondsPerWindow);
136     }
137 
138     @Override
139     public Http2ConnectionHandler build() {
140         return super.build();
141     }
142 
143     @Override
144     protected Http2ConnectionHandler build(Http2ConnectionDecoder decoder, Http2ConnectionEncoder encoder,
145                                            Http2Settings initialSettings) {
146         return new Http2ConnectionHandler(decoder, encoder, initialSettings, decoupleCloseAndGoAway(), flushPreface());
147     }
148 }