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    *   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  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   * @deprecated use NIO / EPOLL / KQUEUE transport.
44   */
45  @Deprecated
46  public interface OioServerSocketChannelConfig extends ServerSocketChannelConfig {
47  
48      /**
49       * Sets the maximal time a operation on the underlying socket may block.
50       */
51      OioServerSocketChannelConfig setSoTimeout(int timeout);
52  
53      /**
54       * Returns the maximal time a operation on the underlying socket may block.
55       */
56      int getSoTimeout();
57  
58      @Override
59      OioServerSocketChannelConfig setBacklog(int backlog);
60  
61      @Override
62      OioServerSocketChannelConfig setReuseAddress(boolean reuseAddress);
63  
64      @Override
65      OioServerSocketChannelConfig setReceiveBufferSize(int receiveBufferSize);
66  
67      @Override
68      OioServerSocketChannelConfig setPerformancePreferences(int connectionTime, int latency, int bandwidth);
69  
70      @Override
71      OioServerSocketChannelConfig setConnectTimeoutMillis(int connectTimeoutMillis);
72  
73      @Override
74      @Deprecated
75      OioServerSocketChannelConfig setMaxMessagesPerRead(int maxMessagesPerRead);
76  
77      @Override
78      OioServerSocketChannelConfig setWriteSpinCount(int writeSpinCount);
79  
80      @Override
81      OioServerSocketChannelConfig setAllocator(ByteBufAllocator allocator);
82  
83      @Override
84      OioServerSocketChannelConfig setRecvByteBufAllocator(RecvByteBufAllocator allocator);
85  
86      @Override
87      OioServerSocketChannelConfig setAutoRead(boolean autoRead);
88  
89      @Override
90      OioServerSocketChannelConfig setAutoClose(boolean autoClose);
91  
92      @Override
93      OioServerSocketChannelConfig setWriteBufferHighWaterMark(int writeBufferHighWaterMark);
94  
95      @Override
96      OioServerSocketChannelConfig setWriteBufferLowWaterMark(int writeBufferLowWaterMark);
97  
98      @Override
99      OioServerSocketChannelConfig setWriteBufferWaterMark(WriteBufferWaterMark writeBufferWaterMark);
100 
101     @Override
102     OioServerSocketChannelConfig setMessageSizeEstimator(MessageSizeEstimator estimator);
103 }