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