org.apache.commons.httpclient.protocol
Interface ProtocolSocketFactory
- SecureProtocolSocketFactory
- DefaultProtocolSocketFactory, SSLProtocolSocketFactory
public interface ProtocolSocketFactory
A factory for creating Sockets.
Both
Object.equals()
and
Object.hashCode()
should be overridden appropriately.
Protocol socket factories are used to uniquely identify
Protocol
s and
HostConfiguration
s, and
equals()
and
hashCode()
are
required for the correct operation of some connection managers.
- Michael Becke
- Mike Bowler
- 2.0
Protocol
Socket | createSocket(String host, int port) - Gets a new socket connection to the given host.
|
Socket | createSocket(String host, int port, InetAddress localAddress, int localPort) - Gets a new socket connection to the given host.
|
Socket | createSocket(String host, int port, InetAddress localAddress, int localPort, HttpConnectionParams params) - Gets a new socket connection to the given host.
|
createSocket
public Socket createSocket(String host,
int port)
throws IOException,
UnknownHostException
Gets a new socket connection to the given host.
host
- the host name/IPport
- the port on the host
- Socket a new socket
createSocket
public Socket createSocket(String host,
int port,
InetAddress localAddress,
int localPort)
throws IOException,
UnknownHostException
Gets a new socket connection to the given host.
host
- the host name/IPport
- the port on the hostlocalAddress
- the local host name/IP to bind the socket tolocalPort
- the port on the local machine
- Socket a new socket
createSocket
public Socket createSocket(String host,
int port,
InetAddress localAddress,
int localPort,
HttpConnectionParams params)
throws IOException,
UnknownHostException,
ConnectTimeoutException
Gets a new socket connection to the given host.
host
- the host name/IPport
- the port on the hostlocalAddress
- the local host name/IP to bind the socket tolocalPort
- the port on the local machineparams
- Http connection parameters
- Socket a new socket
ConnectTimeoutException
- if socket cannot be connected within the
given time limit
- 3.0
Copyright (c) 1999-2005 - Apache Software Foundation