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.udt;
17  
18  import com.barchart.udt.TypeUDT;
19  import com.barchart.udt.nio.KindUDT;
20  import io.netty.buffer.ByteBufAllocator;
21  import io.netty.channel.ChannelConfig;
22  import io.netty.channel.ChannelException;
23  import io.netty.channel.ChannelOption;
24  import io.netty.channel.MessageSizeEstimator;
25  import io.netty.channel.RecvByteBufAllocator;
26  
27  /**
28   * A {@link ChannelConfig} for a {@link UdtServerChannel}.
29   * <p>
30   * Note that {@link TypeUDT#DATAGRAM} message oriented channels treat
31   * {@code "receiveBufferSize"} and {@code "sendBufferSize"} as maximum message
32   * size. If received or sent message does not fit specified sizes,
33   * {@link ChannelException} will be thrown.
34   */
35  public interface UdtServerChannelConfig extends UdtChannelConfig {
36  
37      /**
38       * Gets {@link KindUDT#ACCEPTOR} channel backlog via
39       * {@link ChannelOption#SO_BACKLOG}.
40       */
41      int getBacklog();
42  
43      /**
44       * Sets {@link KindUDT#ACCEPTOR} channel backlog via
45       * {@link ChannelOption#SO_BACKLOG}.
46       */
47      UdtServerChannelConfig setBacklog(int backlog);
48  
49      @Override
50      UdtServerChannelConfig setConnectTimeoutMillis(int connectTimeoutMillis);
51  
52      @Override
53      UdtServerChannelConfig setMaxMessagesPerRead(int maxMessagesPerRead);
54  
55      @Override
56      UdtServerChannelConfig setWriteSpinCount(int writeSpinCount);
57  
58      @Override
59      UdtServerChannelConfig setAllocator(ByteBufAllocator allocator);
60  
61      @Override
62      UdtServerChannelConfig setRecvByteBufAllocator(RecvByteBufAllocator allocator);
63  
64      @Override
65      UdtServerChannelConfig setAutoRead(boolean autoRead);
66  
67      @Override
68      UdtServerChannelConfig setProtocolReceiveBufferSize(int size);
69  
70      @Override
71      UdtServerChannelConfig setProtocolSendBufferSize(int size);
72  
73      @Override
74      UdtServerChannelConfig setReceiveBufferSize(int receiveBufferSize);
75  
76      @Override
77      UdtServerChannelConfig setReuseAddress(boolean reuseAddress);
78  
79      @Override
80      UdtServerChannelConfig setSendBufferSize(int sendBufferSize);
81  
82      @Override
83      UdtServerChannelConfig setSoLinger(int soLinger);
84  
85      @Override
86      UdtServerChannelConfig setSystemReceiveBufferSize(int size);
87  
88      @Override
89      UdtServerChannelConfig setSystemSendBufferSize(int size);
90  
91      @Override
92      UdtServerChannelConfig setWriteBufferHighWaterMark(int writeBufferHighWaterMark);
93  
94      @Override
95      UdtServerChannelConfig setWriteBufferLowWaterMark(int writeBufferLowWaterMark);
96  
97      @Override
98      UdtServerChannelConfig setMessageSizeEstimator(MessageSizeEstimator estimator);
99  }