查看本类的 API文档回源码主页即时通讯网 - 即时通讯开发者社区!
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  import io.netty.util.internal.UnstableApi;
21  
22  /**
23   * Builder which builds {@link Http2ConnectionHandler} objects.
24   */
25  @UnstableApi
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 initialSettings(Http2Settings settings) {
36          return super.initialSettings(settings);
37      }
38  
39      @Override
40      public Http2Settings initialSettings() {
41          return super.initialSettings();
42      }
43  
44      @Override
45      public Http2ConnectionHandlerBuilder frameListener(Http2FrameListener frameListener) {
46          return super.frameListener(frameListener);
47      }
48  
49      @Override
50      public Http2ConnectionHandlerBuilder gracefulShutdownTimeoutMillis(long gracefulShutdownTimeoutMillis) {
51          return super.gracefulShutdownTimeoutMillis(gracefulShutdownTimeoutMillis);
52      }
53  
54      @Override
55      public Http2ConnectionHandlerBuilder server(boolean isServer) {
56          return super.server(isServer);
57      }
58  
59      @Override
60      public Http2ConnectionHandlerBuilder connection(Http2Connection connection) {
61          return super.connection(connection);
62      }
63  
64      @Override
65      public Http2ConnectionHandlerBuilder maxReservedStreams(int maxReservedStreams) {
66          return super.maxReservedStreams(maxReservedStreams);
67      }
68  
69      @Override
70      public Http2ConnectionHandlerBuilder codec(Http2ConnectionDecoder decoder, Http2ConnectionEncoder encoder) {
71          return super.codec(decoder, encoder);
72      }
73  
74      @Override
75      public Http2ConnectionHandlerBuilder frameLogger(Http2FrameLogger frameLogger) {
76          return super.frameLogger(frameLogger);
77      }
78  
79      @Override
80      public Http2ConnectionHandlerBuilder encoderEnforceMaxConcurrentStreams(
81              boolean encoderEnforceMaxConcurrentStreams) {
82          return super.encoderEnforceMaxConcurrentStreams(encoderEnforceMaxConcurrentStreams);
83      }
84  
85      @Override
86      public Http2ConnectionHandlerBuilder encoderIgnoreMaxHeaderListSize(boolean encoderIgnoreMaxHeaderListSize) {
87          return super.encoderIgnoreMaxHeaderListSize(encoderIgnoreMaxHeaderListSize);
88      }
89  
90      @Override
91      public Http2ConnectionHandlerBuilder headerSensitivityDetector(SensitivityDetector headerSensitivityDetector) {
92          return super.headerSensitivityDetector(headerSensitivityDetector);
93      }
94  
95      @Override
96      @Deprecated
97      public Http2ConnectionHandlerBuilder initialHuffmanDecodeCapacity(int initialHuffmanDecodeCapacity) {
98          return super.initialHuffmanDecodeCapacity(initialHuffmanDecodeCapacity);
99      }
100 
101     @Override
102     public Http2ConnectionHandlerBuilder decoupleCloseAndGoAway(boolean decoupleCloseAndGoAway) {
103         return super.decoupleCloseAndGoAway(decoupleCloseAndGoAway);
104     }
105 
106     @Override
107     public Http2ConnectionHandlerBuilder flushPreface(boolean flushPreface) {
108         return super.flushPreface(flushPreface);
109     }
110 
111     @Override
112     public Http2ConnectionHandler build() {
113         return super.build();
114     }
115 
116     @Override
117     protected Http2ConnectionHandler build(Http2ConnectionDecoder decoder, Http2ConnectionEncoder encoder,
118                                            Http2Settings initialSettings) {
119         return new Http2ConnectionHandler(decoder, encoder, initialSettings, decoupleCloseAndGoAway(), flushPreface());
120     }
121 }