23
23
* Factory methods for TCP.
24
24
*
25
25
* @author Gary Russell
26
+ * @author Tim Ysewyn
26
27
* @since 5.0
27
28
*
28
29
*/
29
30
public final class Tcp {
30
31
31
32
/**
32
33
* Boolean indicating the connection factory should use NIO.
34
+ *
35
+ * @deprecated This isn't used anymore within the framework and will be removed in a future release.
33
36
*/
37
+ @ Deprecated
34
38
public static final boolean NIO = true ;
35
39
36
40
/**
37
41
* Boolean indicating the connection factory should not use NIO
38
42
* (default).
43
+ *
44
+ * @deprecated This isn't used anymore within the framework and will be removed in a future release.
39
45
*/
40
- public static final boolean NET = true ;
46
+ @ Deprecated
47
+ public static final boolean NET = false ;
41
48
42
49
private Tcp () {
43
50
super ();
@@ -49,7 +56,7 @@ private Tcp() {
49
56
* @return the spec.
50
57
*/
51
58
public static TcpServerConnectionFactorySpec nioServer (int port ) {
52
- return new TcpServerConnectionFactorySpec (port , NIO );
59
+ return new TcpServerConnectionFactorySpec (port , true );
53
60
}
54
61
55
62
/**
@@ -58,7 +65,7 @@ public static TcpServerConnectionFactorySpec nioServer(int port) {
58
65
* @return the spec.
59
66
*/
60
67
public static TcpServerConnectionFactorySpec netServer (int port ) {
61
- return new TcpServerConnectionFactorySpec (port , NET );
68
+ return new TcpServerConnectionFactorySpec (port , false );
62
69
}
63
70
64
71
/**
@@ -68,7 +75,7 @@ public static TcpServerConnectionFactorySpec netServer(int port) {
68
75
* @return the spec.
69
76
*/
70
77
public static TcpClientConnectionFactorySpec nioClient (String host , int port ) {
71
- return new TcpClientConnectionFactorySpec (host , port , NIO );
78
+ return new TcpClientConnectionFactorySpec (host , port , true );
72
79
}
73
80
74
81
/**
@@ -78,7 +85,7 @@ public static TcpClientConnectionFactorySpec nioClient(String host, int port) {
78
85
* @return the spec.
79
86
*/
80
87
public static TcpClientConnectionFactorySpec netClient (String host , int port ) {
81
- return new TcpClientConnectionFactorySpec (host , port , NET );
88
+ return new TcpClientConnectionFactorySpec (host , port , false );
82
89
}
83
90
84
91
/**
0 commit comments