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