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.channel.socket.oio;
17  
18  import io.netty.buffer.ByteBufAllocator;
19  import io.netty.channel.ChannelOption;
20  import io.netty.channel.MessageSizeEstimator;
21  import io.netty.channel.RecvByteBufAllocator;
22  import io.netty.channel.socket.ServerSocketChannelConfig;
23  
24  
25  /**
26   * A {@link ServerSocketChannelConfig} for a {@link OioServerSocketChannel}.
27   *
28   * <h3>Available options</h3>
29   *
30   * In addition to the options provided by {@link ServerSocketChannelConfig},
31   * {@link OioServerSocketChannelConfig} allows the following options in the
32   * option map:
33   *
34   * <table border="1" cellspacing="0" cellpadding="6">
35   * <tr>
36   * <th>Name</th><th>Associated setter method</th>
37   * </tr><tr>
38   * <td>{@link ChannelOption#SO_TIMEOUT}</td><td>{@link #setSoTimeout(int)}</td>
39   * </tr>
40   * </table>
41   */
42  public interface OioServerSocketChannelConfig extends ServerSocketChannelConfig {
43  
44      /**
45       * Sets the maximal time a operation on the underlying socket may block.
46       */
47      OioServerSocketChannelConfig setSoTimeout(int timeout);
48  
49      /**
50       * Returns the maximal time a operation on the underlying socket may block.
51       */
52      int getSoTimeout();
53  
54      @Override
55      OioServerSocketChannelConfig setBacklog(int backlog);
56  
57      @Override
58      OioServerSocketChannelConfig setReuseAddress(boolean reuseAddress);
59  
60      @Override
61      OioServerSocketChannelConfig setReceiveBufferSize(int receiveBufferSize);
62  
63      @Override
64      OioServerSocketChannelConfig setPerformancePreferences(int connectionTime, int latency, int bandwidth);
65  
66      @Override
67      OioServerSocketChannelConfig setConnectTimeoutMillis(int connectTimeoutMillis);
68  
69      @Override
70      OioServerSocketChannelConfig setMaxMessagesPerRead(int maxMessagesPerRead);
71  
72      @Override
73      OioServerSocketChannelConfig setWriteSpinCount(int writeSpinCount);
74  
75      @Override
76      OioServerSocketChannelConfig setAllocator(ByteBufAllocator allocator);
77  
78      @Override
79      OioServerSocketChannelConfig setRecvByteBufAllocator(RecvByteBufAllocator allocator);
80  
81      @Override
82      OioServerSocketChannelConfig setAutoRead(boolean autoRead);
83  
84      @Override
85      OioServerSocketChannelConfig setAutoClose(boolean autoClose);
86  
87      @Override
88      OioServerSocketChannelConfig setWriteBufferHighWaterMark(int writeBufferHighWaterMark);
89  
90      @Override
91      OioServerSocketChannelConfig setWriteBufferLowWaterMark(int writeBufferLowWaterMark);
92  
93      @Override
94      OioServerSocketChannelConfig setMessageSizeEstimator(MessageSizeEstimator estimator);
95  }