View Javadoc
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  package io.netty.channel.unix;
17  
18  import io.netty.buffer.ByteBufAllocator;
19  import io.netty.channel.ChannelConfig;
20  import io.netty.channel.MessageSizeEstimator;
21  import io.netty.channel.RecvByteBufAllocator;
22  import io.netty.channel.WriteBufferWaterMark;
23  
24  /**
25   * Special {@link ChannelConfig} for {@link DomainSocketChannel}s.
26   */
27  public interface DomainSocketChannelConfig extends ChannelConfig {
28  
29      @Override
30      @Deprecated
31      DomainSocketChannelConfig setMaxMessagesPerRead(int maxMessagesPerRead);
32  
33      @Override
34      DomainSocketChannelConfig setConnectTimeoutMillis(int connectTimeoutMillis);
35  
36      @Override
37      DomainSocketChannelConfig setWriteSpinCount(int writeSpinCount);
38  
39      @Override
40      DomainSocketChannelConfig setAllocator(ByteBufAllocator allocator);
41  
42      @Override
43      DomainSocketChannelConfig setRecvByteBufAllocator(RecvByteBufAllocator allocator);
44  
45      @Override
46      DomainSocketChannelConfig setAutoRead(boolean autoRead);
47  
48      @Override
49      DomainSocketChannelConfig setAutoClose(boolean autoClose);
50  
51      @Override
52      @Deprecated
53      DomainSocketChannelConfig setWriteBufferHighWaterMark(int writeBufferHighWaterMark);
54  
55      @Override
56      @Deprecated
57      DomainSocketChannelConfig setWriteBufferLowWaterMark(int writeBufferLowWaterMark);
58  
59      @Override
60      DomainSocketChannelConfig setWriteBufferWaterMark(WriteBufferWaterMark writeBufferWaterMark);
61  
62      @Override
63      DomainSocketChannelConfig setMessageSizeEstimator(MessageSizeEstimator estimator);
64  
65      /**
66       * Change the {@link DomainSocketReadMode} for the channel. The default is
67       * {@link DomainSocketReadMode#BYTES} which means bytes will be read from the
68       * {@link io.netty.channel.Channel} and passed through the pipeline. If
69       * {@link DomainSocketReadMode#FILE_DESCRIPTORS} is used
70       * {@link FileDescriptor}s will be passed through the {@link io.netty.channel.ChannelPipeline}.
71       *
72       * This setting can be modified on the fly if needed.
73       */
74      DomainSocketChannelConfig setReadMode(DomainSocketReadMode mode);
75  
76      /**
77       * Return the {@link DomainSocketReadMode} for the channel.
78       */
79      DomainSocketReadMode getReadMode();
80  }