View Javadoc

1   /*
2    *  Licensed to the Apache Software Foundation (ASF) under one
3    *  or more contributor license agreements.  See the NOTICE file
4    *  distributed with this work for additional information
5    *  regarding copyright ownership.  The ASF licenses this file
6    *  to you under the Apache License, Version 2.0 (the
7    *  "License"); you may not use this file except in compliance
8    *  with the License.  You may obtain a copy of the License at
9    *
10   *    http://www.apache.org/licenses/LICENSE-2.0
11   *
12   *  Unless required by applicable law or agreed to in writing,
13   *  software distributed under the License is distributed on an
14   *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   *  KIND, either express or implied.  See the License for the
16   *  specific language governing permissions and limitations
17   *  under the License.
18   *
19   */
20  package org.apache.mina.transport.socket;
21  
22  import java.net.DatagramSocket;
23  
24  import org.apache.mina.core.session.IoSessionConfig;
25  
26  /**
27   * An {@link IoSessionConfig} for datagram transport type.
28   *
29   * @author The Apache MINA Project (dev@mina.apache.org)
30   */
31  public interface DatagramSessionConfig extends IoSessionConfig {
32      /**
33       * @see DatagramSocket#getBroadcast()
34       */
35      boolean isBroadcast();
36  
37      /**
38       * @see DatagramSocket#setBroadcast(boolean)
39       */
40      void setBroadcast(boolean broadcast);
41  
42      /**
43       * @see DatagramSocket#getReuseAddress()
44       */
45      boolean isReuseAddress();
46  
47      /**
48       * @see DatagramSocket#setReuseAddress(boolean)
49       */
50      void setReuseAddress(boolean reuseAddress);
51  
52      /**
53       * @see DatagramSocket#getReceiveBufferSize()
54       */
55      int getReceiveBufferSize();
56  
57      /**
58       * @see DatagramSocket#setReceiveBufferSize(int)
59       */
60      void setReceiveBufferSize(int receiveBufferSize);
61  
62      /**
63       * @see DatagramSocket#getSendBufferSize()
64       */
65      int getSendBufferSize();
66  
67      /**
68       * @see DatagramSocket#setSendBufferSize(int)
69       */
70      void setSendBufferSize(int sendBufferSize);
71  
72      /**
73       * @see DatagramSocket#getTrafficClass()
74       */
75      int getTrafficClass();
76  
77      /**
78       * @see DatagramSocket#setTrafficClass(int)
79       */
80      void setTrafficClass(int trafficClass);
81  }