KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > dream > channel > IPSocketManagerTCPAttributeController


1 /**
2  * Dream
3  * Copyright (C) 2003-2004 INRIA Rhone-Alpes
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18  *
19  * Contact: dream@objectweb.org
20  *
21  * Initial developer(s): Matthieu Leclercq
22  * Contributor(s):
23  */

24
25 package org.objectweb.dream.channel;
26
27 import org.objectweb.fractal.api.control.AttributeController;
28
29 /**
30  * Attribute controller for components providing an {@link IPSocketManager }
31  * interface, using TCP/IP connection.
32  */

33 public interface IPSocketManagerTCPAttributeController
34     extends
35       AttributeController
36 {
37   /** Default value of <code>cnxRetry</code> attribute. */
38   int CNX_RETRY_DEFAULT = 5;
39
40   /**
41    * Returns the number of connection retry before abording.
42    *
43    * @return {@link #CNX_RETRY_DEFAULT}by default, or the value setted by
44    * {@link #setCnxRetry(int)}.
45    */

46   int getCnxRetry();
47
48   /**
49    * Sets the <code>cnxRetry</code> attribute's value.
50    *
51    * @param cnxRetry the number of connection retry before abording.
52    */

53   void setCnxRetry(int cnxRetry);
54
55   /**
56    * Returns <code>true</code> if the Nagle's algorithm is disabled on created
57    * sockets.
58    *
59    * @return the <code>tcpNoDelay</code> attribute's value.
60    * @see java.net.Socket#setTcpNoDelay(boolean)
61    */

62   boolean getTcpNoDelay();
63
64   /**
65    * Sets the <code>tcpNoDelay</code> attribute's value.
66    *
67    * @param tcpNoDelay the new <code>tcpNoDelay</code> attribute's value.
68    * @see #getTcpNoDelay()
69    */

70   void setTcpNoDelay(boolean tcpNoDelay);
71
72   /**
73    * Returns the <code>SO_TIMEOUT</code> parameter setted on created sockets.
74    *
75    * @return the <code>soTimeout</code> attribute's value.
76    * @see java.net.Socket#setSoTimeout(int)
77    */

78   int getSoTimeout();
79
80   /**
81    * Sets the <code>soTimeout</code> attribute's value.
82    *
83    * @param timeout the new <code>soTimeout</code> attribute's value.
84    * @see #getSoTimeout()
85    */

86   void setSoTimeout(int timeout);
87
88   /**
89    * Returns the <code>SO_LINGER</code> parameter setted on created sockets. A
90    * negative value disable the linger on close.
91    *
92    * @return the <code>soLinger</code> attribute's value.
93    * @see java.net.Socket#setSoLinger(boolean, int)
94    */

95   int getSoLinger();
96
97   /**
98    * Sets the <code>soLinger</code> attribute's value.
99    *
100    * @param timeout the new <code>soLinger</code> attribute's value.
101    */

102   void setSoLinger(int timeout);
103 }
Popular Tags