public class EasySslSocketFactory extends Object implements SecureProtocolSocketFactory
Modifier and Type | Class and Description |
---|---|
static class |
EasySslSocketFactory.EasyX509TrustManager
jakarta code for SSL that doesnt fail with self-signed certs
|
Constructor and Description |
---|
EasySslSocketFactory() |
Modifier and Type | Method and Description |
---|---|
Socket |
createSocket(Socket socket,
String host,
int port,
boolean autoClose)
Returns a socket connected to the given host that is layered over an
existing socket.
|
Socket |
createSocket(String host,
int port)
Gets a new socket connection to the given host.
|
Socket |
createSocket(String host,
int port,
InetAddress clientHost,
int clientPort)
Gets a new socket connection to the given host.
|
Socket |
createSocket(String host,
int port,
InetAddress clientHost,
int clientPort,
HttpConnectionParams arg4)
Gets a new socket connection to the given host.
|
public Socket createSocket(String host, int port, InetAddress clientHost, int clientPort) throws IOException, UnknownHostException
ProtocolSocketFactory
createSocket
in interface ProtocolSocketFactory
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 machineIOException
- if an I/O error occurs while creating the socketUnknownHostException
- if the IP address of the host cannot be
determinedProtocolSocketFactory.createSocket(java.lang.String,int,java.net.InetAddress,int)
public Socket createSocket(String host, int port) throws IOException, UnknownHostException
ProtocolSocketFactory
createSocket
in interface ProtocolSocketFactory
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
determinedProtocolSocketFactory.createSocket(java.lang.String,int)
public Socket createSocket(Socket socket, String host, int port, boolean autoClose) throws IOException, UnknownHostException
SecureProtocolSocketFactory
createSocket
in interface SecureProtocolSocketFactory
socket
- the existing sockethost
- the host name/IPport
- the port on the hostautoClose
- a flag for closing the underling socket when the created
socket is closedIOException
- if an I/O error occurs while creating the socketUnknownHostException
- if the IP address of the host cannot be
determinedSecureProtocolSocketFactory.createSocket(java.net.Socket,java.lang.String,int,boolean)
public Socket createSocket(String host, int port, InetAddress clientHost, int clientPort, HttpConnectionParams arg4) throws IOException, UnknownHostException, ConnectTimeoutException
ProtocolSocketFactory
createSocket
in interface ProtocolSocketFactory
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 machinearg4
- Http connection parameters
IOException
- 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 limitorg.apache.commons.httpclient.protocol.ProtocolSocketFactory#createSocket(java.lang.String, int, java.net.InetAddress, int, org.apache.commons.httpclient.params.HttpConnectionParams)
Copyright © 2020 Internet2. All rights reserved.