Package org.globus.net
Class SocketFactory
java.lang.Object
org.globus.net.SocketFactory
This factory allows for creating regular sockets.
If the tcp.source.port.range system property is set it will create
sockets within the specified local port range (if the local port
number is set to 0).
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateSocket
(String host, int port) createSocket
(String host, int port, InetAddress localAddr, int localPort) createSocket
(InetAddress address, int port) private Socket
createSocket
(InetAddress address, int port, InetAddress localAddr) createSocket
(InetAddress address, int port, InetAddress localAddr, int localPort) static SocketFactory
Returns the default instance of this class.
-
Field Details
-
defaultFactory
-
portRange
-
-
Constructor Details
-
SocketFactory
protected SocketFactory()
-
-
Method Details
-
getDefault
Returns the default instance of this class.- Returns:
- SocketFactory instance of this class.
-
createSocket
- Throws:
IOException
-
createSocket
- Throws:
IOException
-
createSocket
public Socket createSocket(String host, int port, InetAddress localAddr, int localPort) throws IOException - Throws:
IOException
-
createSocket
public Socket createSocket(InetAddress address, int port, InetAddress localAddr, int localPort) throws IOException - Throws:
IOException
-
createSocket
private Socket createSocket(InetAddress address, int port, InetAddress localAddr) throws IOException - Throws:
IOException
-