All Packages Class Hierarchy This Package Previous Next Index
Interface com.oroinc.net.SocketFactory
- public interface SocketFactory
The SocketFactory interface provides a means for the programmer to
control the creation of sockets and provide his own Socket
implementations for use by all classes derived from
SocketClient .
This allows you to provide your own Socket implementations and
to perform security checks or browser capability requests before
creating a Socket.
Copyright © 1997-1998 Original Reusable Objects, Inc.
All rights reserved.
- See Also:
- DefaultSocketFactory
-
createServerSocket(int)
- Creates a ServerSocket bound to a specified port.
-
createServerSocket(int, int)
- Creates a ServerSocket bound to a specified port with a given
maximum queue length for incoming connections.
-
createServerSocket(int, int, InetAddress)
- Creates a ServerSocket bound to a specified port on a given local
address with a given maximum queue length for incoming connections.
-
createSocket(InetAddress, int)
- Creates a Socket connected to the given host and port.
-
createSocket(InetAddress, int, InetAddress, int)
- Creates a Socket connected to the given host and port and
originating from the specified local address and port.
-
createSocket(String, int)
- Creates a Socket connected to the given host and port.
-
createSocket(String, int, InetAddress, int)
- Creates a Socket connected to the given host and port and
originating from the specified local address and port.
createSocket
public abstract Socket createSocket(String host,
int port) throws UnknownHostException, IOException
- Creates a Socket connected to the given host and port.
- Parameters:
- host - The hostname to connect to.
- port - The port to connect to.
- Returns:
- A Socket connected to the given host and port.
- Throws: UnknownHostException
- If the hostname cannot be resolved.
- Throws: IOException
- If an I/O error occurs while creating the Socket.
createSocket
public abstract Socket createSocket(InetAddress address,
int port) throws IOException
- Creates a Socket connected to the given host and port.
- Parameters:
- address - The address of the host to connect to.
- port - The port to connect to.
- Returns:
- A Socket connected to the given host and port.
- Throws: IOException
- If an I/O error occurs while creating the Socket.
createSocket
public abstract Socket createSocket(String host,
int port,
InetAddress localAddr,
int localPort) throws UnknownHostException, IOException
- Creates a Socket connected to the given host and port and
originating from the specified local address and port.
- Parameters:
- host - The hostname to connect to.
- port - The port to connect to.
- localAddr - The local address to use.
- localPort - The local port to use.
- Returns:
- A Socket connected to the given host and port.
- Throws: UnknownHostException
- If the hostname cannot be resolved.
- Throws: IOException
- If an I/O error occurs while creating the Socket.
createSocket
public abstract Socket createSocket(InetAddress address,
int port,
InetAddress localAddr,
int localPort) throws IOException
- Creates a Socket connected to the given host and port and
originating from the specified local address and port.
- Parameters:
- address - 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.
- Returns:
- A Socket connected to the given host and port.
- Throws: IOException
- If an I/O error occurs while creating the Socket.
createServerSocket
public abstract ServerSocket createServerSocket(int port) throws IOException
- Creates a ServerSocket bound to a specified port. A port
of 0 will create the ServerSocket on a system-determined free port.
- Parameters:
- port - The port on which to listen, or 0 to use any free port.
- Returns:
- A ServerSocket that will listen on a specified port.
- Throws: IOException
- If an I/O error occurs while creating
the ServerSocket.
createServerSocket
public abstract ServerSocket createServerSocket(int port,
int backlog) throws IOException
- Creates a ServerSocket bound to a specified port with a given
maximum queue length for incoming connections. A port of 0 will
create the ServerSocket on a system-determined free port.
- Parameters:
- port - The port on which to listen, or 0 to use any free port.
- backlog - The maximum length of the queue for incoming connections.
- Returns:
- A ServerSocket that will listen on a specified port.
- Throws: IOException
- If an I/O error occurs while creating
the ServerSocket.
createServerSocket
public abstract ServerSocket createServerSocket(int port,
int backlog,
InetAddress bindAddr) throws IOException
- Creates a ServerSocket bound to a specified port on a given local
address with a given maximum queue length for incoming connections.
A port of 0 will
create the ServerSocket on a system-determined free port.
- Parameters:
- 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.
- Returns:
- A ServerSocket that will listen on a specified port.
- Throws: IOException
- If an I/O error occurs while creating
the ServerSocket.
All Packages Class Hierarchy This Package Previous Next Index