Class EasySslSocketFactory
java.lang.Object
edu.internet2.middleware.grouperClient.ssl.EasySslSocketFactory
- All Implemented Interfaces:
ProtocolSocketFactory
,SecureProtocolSocketFactory
Apache code for SSL that doesnt fail with self-signed certs
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
jakarta code for SSL that doesnt fail with self-signed certs -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateSocket
(String host, int port) Gets a new socket connection to the given host.createSocket
(String host, int port, InetAddress clientHost, int clientPort) Gets a new socket connection to the given host.createSocket
(String host, int port, InetAddress clientHost, int clientPort, HttpConnectionParams arg4) Gets a new socket connection to the given host.createSocket
(Socket socket, String host, int port, boolean autoClose) Returns a socket connected to the given host that is layered over an existing socket.
-
Constructor Details
-
EasySslSocketFactory
public EasySslSocketFactory()
-
-
Method Details
-
createSocket
public Socket createSocket(String host, int port, InetAddress clientHost, int clientPort) throws IOException, UnknownHostException Description copied from interface:ProtocolSocketFactory
Gets a new socket connection to the given host.- Specified by:
createSocket
in interfaceProtocolSocketFactory
- 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 socketUnknownHostException
- if the IP address of the host cannot be determined- See Also:
-
createSocket
Description copied from interface:ProtocolSocketFactory
Gets a new socket connection to the given host.- Specified by:
createSocket
in interfaceProtocolSocketFactory
- 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 socketUnknownHostException
- if the IP address of the host cannot be determined- See Also:
-
createSocket
public Socket createSocket(Socket socket, String host, int port, boolean autoClose) throws IOException, UnknownHostException Description copied from interface:SecureProtocolSocketFactory
Returns a socket connected to the given host that is layered over an existing socket. Used primarily for creating secure sockets through proxies.- Specified by:
createSocket
in interfaceSecureProtocolSocketFactory
- Parameters:
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 closed- Returns:
- Socket a new socket
- Throws:
IOException
- if an I/O error occurs while creating the socketUnknownHostException
- if the IP address of the host cannot be determined- See Also:
-
createSocket
public Socket createSocket(String host, int port, InetAddress clientHost, int clientPort, HttpConnectionParams arg4) throws IOException, UnknownHostException, ConnectTimeoutException Description copied from interface:ProtocolSocketFactory
Gets a new socket connection to the given host.- Specified by:
createSocket
in interfaceProtocolSocketFactory
- 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 machinearg4
-Http connection parameters
- Returns:
- Socket a new socket
- Throws:
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 limit- See Also:
-
ProtocolSocketFactory.createSocket(java.lang.String, int, java.net.InetAddress, int, org.apache.commons.httpclient.params.HttpConnectionParams)
-