| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.net.SocketFactory
org.apache.commons.net.DefaultSocketFactory
public class DefaultSocketFactory
DefaultSocketFactory implements the SocketFactory interface by
 simply wrapping the java.net.Socket and java.net.ServerSocket
 constructors.  It is the default SocketFactory used by
 SocketClient
 implementations.
 
SocketFactory, 
SocketClient, 
SocketClient.setSocketFactory(javax.net.SocketFactory)| Constructor Summary | |
|---|---|
| DefaultSocketFactory() | |
| Method Summary | |
|---|---|
|  ServerSocket | createServerSocket(int port)Creates a ServerSocket bound to a specified port. | 
|  ServerSocket | createServerSocket(int port,
                                     int backlog)Creates a ServerSocket bound to a specified port with a given maximum queue length for incoming connections. | 
|  ServerSocket | createServerSocket(int port,
                                     int backlog,
                                     InetAddress bindAddr)Creates a ServerSocket bound to a specified port on a given local address with a given maximum queue length for incoming connections. | 
|  Socket | createSocket(InetAddress address,
                         int port)Creates a Socket connected to the given host and port. | 
|  Socket | createSocket(InetAddress address,
                         int port,
                         InetAddress localAddr,
                         int localPort)Creates a Socket connected to the given host and port and originating from the specified local address and port. | 
|  Socket | createSocket(String host,
                         int port)Creates a Socket connected to the given host and port. | 
|  Socket | createSocket(String host,
                         int port,
                         InetAddress localAddr,
                         int localPort)Creates a Socket connected to the given host and port and originating from the specified local address and port. | 
| Methods inherited from class javax.net.SocketFactory | 
|---|
| createSocket, getDefault | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public DefaultSocketFactory()
| Method Detail | 
|---|
public Socket createSocket(String host,
                           int port)
                    throws UnknownHostException,
                           IOException
createSocket in class SocketFactoryhost - The hostname to connect to.port - The port to connect to.
UnknownHostException - If the hostname cannot be resolved.
IOException - If an I/O error occurs while creating the Socket.
public Socket createSocket(InetAddress address,
                           int port)
                    throws IOException
createSocket in class SocketFactoryaddress - The address of the host to connect to.port - The port to connect to.
IOException - If an I/O error occurs while creating the Socket.
public Socket createSocket(String host,
                           int port,
                           InetAddress localAddr,
                           int localPort)
                    throws UnknownHostException,
                           IOException
createSocket in class SocketFactoryhost - The hostname to connect to.port - The port to connect to.localAddr - The local address to use.localPort - The local port to use.
UnknownHostException - If the hostname cannot be resolved.
IOException - If an I/O error occurs while creating the Socket.
public Socket createSocket(InetAddress address,
                           int port,
                           InetAddress localAddr,
                           int localPort)
                    throws IOException
createSocket in class SocketFactoryaddress - The address of the host to connect to.port - The port to connect to.localAddr - The local address to use.localPort - The local port to use.
IOException - If an I/O error occurs while creating the Socket.
public ServerSocket createServerSocket(int port)
                                throws IOException
port - The port on which to listen, or 0 to use any free port.
IOException - If an I/O error occurs while creating
                        the ServerSocket.
public ServerSocket createServerSocket(int port,
                                       int backlog)
                                throws IOException
port - The port on which to listen, or 0 to use any free port.backlog - The maximum length of the queue for incoming connections.
IOException - If an I/O error occurs while creating
                        the ServerSocket.
public ServerSocket createServerSocket(int port,
                                       int backlog,
                                       InetAddress bindAddr)
                                throws IOException
port - The port on which to listen, or 0 to use any free port.backlog - The maximum length of the queue for incoming connections.bindAddr - The local address to which the ServerSocket should bind.
IOException - If an I/O error occurs while creating
                        the ServerSocket.| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||