public interface ProtocolSocketFactory
Both Object.equals() and
Object.hashCode() should be overridden appropriately.
Protocol socket factories are used to uniquely identify Protocols and
HostConfigurations, and equals() and hashCode() are
required for the correct operation of some connection managers.
Protocol| Modifier and Type | Method and Description |
|---|---|
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.
|
Socket createSocket(String host, int port, InetAddress localAddress, int localPort) throws IOException, UnknownHostException
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 machineIOException - if an I/O error occurs while creating the socketUnknownHostException - if the IP address of the host cannot be
determinedSocket createSocket(String host, int port, InetAddress localAddress, int localPort, HttpConnectionParams params) throws IOException, UnknownHostException, ConnectTimeoutException
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 parametersIOException - if an I/O error occurs while creating the socketUnknownHostException - if the IP address of the host cannot be
determinedConnectTimeoutException - if socket cannot be connected within the
given time limitSocket createSocket(String host, int port) throws IOException, UnknownHostException
host - the host name/IPport - the port on the hostIOException - if an I/O error occurs while creating the socketUnknownHostException - if the IP address of the host cannot be
determinedCopyright © 2020 Internet2. All rights reserved.