Methods Summary |
---|
public java.net.Socket | createSocket()Creates a new socket which is not connected to any remote host. This
method has to be overridden by a subclass otherwise a {@code
SocketException} is thrown.
// follow RI's behavior
throw new SocketException("Unconnected sockets not implemented");
|
public abstract java.net.Socket | createSocket(java.lang.String host, int port)Creates a new socket which is connected to the remote host specified by
the parameters {@code host} and {@code port}. The socket is bound to any
available local address and port.
|
public abstract java.net.Socket | createSocket(java.lang.String host, int port, java.net.InetAddress localHost, int localPort)Creates a new socket which is connected to the remote host specified by
the parameters {@code host} and {@code port}. The socket is bound to the
local network interface specified by the InetAddress {@code localHost} on
port {@code localPort}.
|
public abstract java.net.Socket | createSocket(java.net.InetAddress host, int port)Creates a new socket which is connected to the remote host specified by
the InetAddress {@code host}. The socket is bound to any available local
address and port.
|
public abstract java.net.Socket | createSocket(java.net.InetAddress address, int port, java.net.InetAddress localAddress, int localPort)Creates a new socket which is connected to the remote host specified by
the InetAddress {@code address}. The socket is bound to the local network
interface specified by the InetAddress {@code localHost} on port {@code
localPort}.
|
public static synchronized javax.net.SocketFactory | getDefault()Gets the default socket factory of the system which can be used to create
new sockets without creating a subclass of this factory.
if (defaultFactory == null) {
defaultFactory = new DefaultSocketFactory();
}
return defaultFactory;
|