Package org.globus.net
Class SocketFactory
- java.lang.Object
-
- org.globus.net.SocketFactory
-
public class SocketFactory extends java.lang.ObjectThis 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 Modifier and Type Class Description (package private) classSocketFactory.PrSocket
-
Field Summary
Fields Modifier and Type Field Description private static SocketFactorydefaultFactoryprivate PortRangeportRange
-
Constructor Summary
Constructors Modifier Constructor Description protectedSocketFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.net.SocketcreateSocket(java.lang.String host, int port)java.net.SocketcreateSocket(java.lang.String host, int port, java.net.InetAddress localAddr, int localPort)java.net.SocketcreateSocket(java.net.InetAddress address, int port)private java.net.SocketcreateSocket(java.net.InetAddress address, int port, java.net.InetAddress localAddr)java.net.SocketcreateSocket(java.net.InetAddress address, int port, java.net.InetAddress localAddr, int localPort)static SocketFactorygetDefault()Returns the default instance of this class.
-
-
-
Field Detail
-
defaultFactory
private static SocketFactory defaultFactory
-
portRange
private PortRange portRange
-
-
Method Detail
-
getDefault
public static SocketFactory getDefault()
Returns the default instance of this class.- Returns:
- SocketFactory instance of this class.
-
createSocket
public java.net.Socket createSocket(java.lang.String host, int port) throws java.io.IOException- Throws:
java.io.IOException
-
createSocket
public java.net.Socket createSocket(java.net.InetAddress address, int port) throws java.io.IOException- Throws:
java.io.IOException
-
createSocket
public java.net.Socket createSocket(java.lang.String host, int port, java.net.InetAddress localAddr, int localPort) throws java.io.IOException- Throws:
java.io.IOException
-
createSocket
public java.net.Socket createSocket(java.net.InetAddress address, int port, java.net.InetAddress localAddr, int localPort) throws java.io.IOException- Throws:
java.io.IOException
-
createSocket
private java.net.Socket createSocket(java.net.InetAddress address, int port, java.net.InetAddress localAddr) throws java.io.IOException- Throws:
java.io.IOException
-
-