org.apache.commons.httpclient.protocol
Interface ProtocolSocketFactory
- All Known Subinterfaces:
- SecureProtocolSocketFactory
- All Known Implementing Classes:
- DefaultProtocolSocketFactory
- public interface ProtocolSocketFactory
A factory for creating Sockets.
- Since:
- 2.0
- Author:
- Michael Becke, Mike Bowler
- See Also:
Protocol
createSocket
public Socket createSocket(String host,
int port,
InetAddress clientHost,
int clientPort)
throws IOException,
UnknownHostException
- Gets a new socket connection to the given host.
- Parameters:
host
- the host name/IPport
- the port on the hostclientHost
- the local host name/IP to bind the socket toclientPort
- the port on the local machine- Returns:
- Socket a new socket
- Throws:
- IOException - if an I/O error occurs while creating the socket
- UnknownHostException - if the IP address of the host cannot be
determined
createSocket
public Socket createSocket(String host,
int port)
throws IOException,
UnknownHostException
- Gets a new socket connection to the given host.
- Parameters:
host
- the host name/IPport
- the port on the host- Returns:
- Socket a new socket
- Throws:
- IOException - if an I/O error occurs while creating the socket
- UnknownHostException - if the IP address of the host cannot be
determined
Copyright © 2001-2003 Apache Software Foundation. All Rights Reserved.